mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-08 16:23:42 -04:00
Added testsuite for listing repository archives
This commit is contained in:
parent
c839eb63f7
commit
87173d25de
1 changed files with 12 additions and 0 deletions
|
|
@ -1144,6 +1144,18 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
|||
self.assertEqual(output_1, output_2)
|
||||
self.assertNotEqual(output_1, output_3)
|
||||
|
||||
def test_list_repository_format(self):
|
||||
self.cmd('init', self.repository_location)
|
||||
self.cmd('create', self.repository_location + '::test-1', src_dir)
|
||||
self.cmd('create', self.repository_location + '::test-2', src_dir)
|
||||
output_1 = self.cmd('list', self.repository_location)
|
||||
output_2 = self.cmd('list', '--format', '{archive:<36} {time} [{id}]{NL}', self.repository_location)
|
||||
self.assertEqual(output_1, output_2)
|
||||
output_1 = self.cmd('list', '--short', self.repository_location)
|
||||
self.assertEqual(output_1, 'test-1\ntest-2\n')
|
||||
output_1 = self.cmd('list', '--format', '{barchive}/', self.repository_location)
|
||||
self.assertEqual(output_1, 'test-1/test-2/')
|
||||
|
||||
def test_list_hash(self):
|
||||
self.create_regular_file('empty_file', size=0)
|
||||
self.create_regular_file('amb', contents=b'a' * 1000000)
|
||||
|
|
|
|||
Loading…
Reference in a new issue