|
@@ -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)
|