7z supports xz.

This commit is contained in:
Bastian Kleineidam 2013-02-27 20:05:54 +01:00
parent 263742c92a
commit 37c9690d2a
3 changed files with 7 additions and 2 deletions

View File

@ -244,7 +244,7 @@ ArchivePrograms = {
'create': ('shorten',),
},
'xz': {
None: ('xz',),
None: ('xz', '7z'),
'extract': py_lzma,
'create': py_lzma,
},

View File

@ -30,6 +30,7 @@ extract_bzip2 = \
extract_rpm = \
extract_deb = \
extract_iso = \
extract_xz = \
extract_7z
def list_7z (archive, compression, cmd, verbosity):
@ -47,6 +48,7 @@ list_bzip2 = \
list_rpm = \
list_deb = \
list_iso = \
list_xz = \
list_7z
@ -65,6 +67,7 @@ test_bzip2 = \
test_rpm = \
test_deb = \
test_iso = \
test_xz = \
test_7z
@ -75,4 +78,5 @@ def create_7z (archive, compression, cmd, verbosity, filenames):
return cmdlist
create_zip = \
create_xz = \
create_7z

View File

@ -24,6 +24,7 @@ class Test7z (ArchiveTest):
def test_7z (self):
self.archive_commands('t .7z')
self.archive_commands('t.zip')
self.archive_commands('t.txt.xz', check=Content.Singlefile)
self.archive_list('t.txt.gz')
self.archive_list('t.txt.bz2')
self.archive_list('t.jar')
@ -67,6 +68,7 @@ class Test7z (ArchiveTest):
def test_7z_file (self):
self.archive_commands('t.7z.foo', skip_create=True)
self.archive_commands('t.zip.foo', skip_create=True)
self.archive_commands('t.txt.xz.foo', skip_create=True, check=Content.Singlefile)
self.archive_list('t.txt.gz.foo')
self.archive_list('t.txt.bz2.foo')
self.archive_list('t.jar.foo')
@ -105,4 +107,3 @@ class Test7z (ArchiveTest):
self.archive_list('t.rar.foo')
self.archive_extract('t.rar.foo')
self.archive_test('t.rar.foo')