1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-25 01:06:50 +00:00

testsuite/archiver.py: Fix misspelling regual -> regular

This commit is contained in:
Jeremy Maitin-Shepard 2014-04-30 14:43:32 -07:00
parent c502481d5e
commit 1955484e1b

View file

@ -106,7 +106,7 @@ def create_src_archive(self, name):
class ArchiverTestCase(ArchiverTestCaseBase):
def create_regual_file(self, name, size=0):
def create_regular_file(self, name, size=0):
filename = os.path.join(self.input_path, name)
if not os.path.exists(os.path.dirname(filename)):
os.makedirs(os.path.dirname(filename))
@ -117,11 +117,11 @@ def create_test_files(self):
"""Create a minimal test case including all supported file types
"""
# File
self.create_regual_file('empty', size=0)
self.create_regual_file('file1', size=1024 * 80)
self.create_regual_file('flagfile', size=1024)
self.create_regular_file('empty', size=0)
self.create_regular_file('file1', size=1024 * 80)
self.create_regular_file('flagfile', size=1024)
# Directory
self.create_regual_file('dir2/file2', size=1024 * 80)
self.create_regular_file('dir2/file2', size=1024 * 80)
# File owner
os.chown('input/file1', 100, 200)
# File mode
@ -163,10 +163,10 @@ def test_basic_functionality(self):
def test_extract_include_exclude(self):
self.attic('init', self.repository_location)
self.create_regual_file('file1', size=1024 * 80)
self.create_regual_file('file2', size=1024 * 80)
self.create_regual_file('file3', size=1024 * 80)
self.create_regual_file('file4', size=1024 * 80)
self.create_regular_file('file1', size=1024 * 80)
self.create_regular_file('file2', size=1024 * 80)
self.create_regular_file('file3', size=1024 * 80)
self.create_regular_file('file4', size=1024 * 80)
self.attic('create', '--exclude=input/file4', self.repository_location + '::test', 'input')
with changedir('output'):
self.attic('extract', self.repository_location + '::test', 'input/file1', )
@ -180,7 +180,7 @@ def test_extract_include_exclude(self):
def test_path_normalization(self):
self.attic('init', self.repository_location)
self.create_regual_file('dir1/dir2/file', size=1024 * 80)
self.create_regular_file('dir1/dir2/file', size=1024 * 80)
with changedir('input/dir1/dir2'):
self.attic('create', self.repository_location + '::test', '../../../input/dir1/../dir1/dir2/..')
output = self.attic('list', self.repository_location + '::test')
@ -188,13 +188,13 @@ def test_path_normalization(self):
self.assert_in(' input/dir1/dir2/file', output)
def test_repeated_files(self):
self.create_regual_file('file1', size=1024 * 80)
self.create_regular_file('file1', size=1024 * 80)
self.attic('init', self.repository_location)
self.attic('create', self.repository_location + '::test', 'input', 'input')
def test_overwrite(self):
self.create_regual_file('file1', size=1024 * 80)
self.create_regual_file('dir2/file2', size=1024 * 80)
self.create_regular_file('file1', size=1024 * 80)
self.create_regular_file('dir2/file2', size=1024 * 80)
self.attic('init', self.repository_location)
self.attic('create', self.repository_location + '::test', 'input')
# Overwriting regular files and directories should be supported
@ -212,8 +212,8 @@ def test_overwrite(self):
self.attic('extract', self.repository_location + '::test', exit_code=1)
def test_delete(self):
self.create_regual_file('file1', size=1024 * 80)
self.create_regual_file('dir2/file2', size=1024 * 80)
self.create_regular_file('file1', size=1024 * 80)
self.create_regular_file('dir2/file2', size=1024 * 80)
self.attic('init', self.repository_location)
self.attic('create', self.repository_location + '::test', 'input')
self.attic('create', self.repository_location + '::test.2', 'input')
@ -249,7 +249,7 @@ def test_readonly_repository(self):
os.system('chmod -R u+w ' + self.repository_path)
def test_cmdline_compatibility(self):
self.create_regual_file('file1', size=1024 * 80)
self.create_regular_file('file1', size=1024 * 80)
self.attic('init', self.repository_location)
self.attic('create', self.repository_location + '::test', 'input')
output = self.attic('verify', '-v', self.repository_location + '::test')