Add zip test command.
This commit is contained in:
parent
e92fdd3d58
commit
b341a83cde
|
@ -136,7 +136,7 @@ ArchivePrograms = {
|
||||||
None: ('7z', '7za', 'py_zipfile'),
|
None: ('7z', '7za', 'py_zipfile'),
|
||||||
'extract': ('unzip',),
|
'extract': ('unzip',),
|
||||||
'list': ('unzip',),
|
'list': ('unzip',),
|
||||||
'test': ('unzip',),
|
'test': ('zip', 'unzip',),
|
||||||
'create': ('zip',),
|
'create': ('zip',),
|
||||||
},
|
},
|
||||||
'gzip': {
|
'gzip': {
|
||||||
|
|
|
@ -23,3 +23,11 @@ def create_zip (archive, compression, cmd, *args, **kwargs):
|
||||||
cmdlist.append(archive)
|
cmdlist.append(archive)
|
||||||
cmdlist.extend(args)
|
cmdlist.extend(args)
|
||||||
return cmdlist
|
return cmdlist
|
||||||
|
|
||||||
|
def test_zip (archive, compression, cmd, *args, **kwargs):
|
||||||
|
"""Test a ZIP archive."""
|
||||||
|
cmdlist = [cmd, '--test']
|
||||||
|
if kwargs['verbose']:
|
||||||
|
cmdlist.append('-v')
|
||||||
|
cmdlist.append(archive)
|
||||||
|
return cmdlist
|
||||||
|
|
Loading…
Reference in New Issue