Add zip test command.
This commit is contained in:
parent
e92fdd3d58
commit
b341a83cde
|
@ -136,7 +136,7 @@ ArchivePrograms = {
|
|||
None: ('7z', '7za', 'py_zipfile'),
|
||||
'extract': ('unzip',),
|
||||
'list': ('unzip',),
|
||||
'test': ('unzip',),
|
||||
'test': ('zip', 'unzip',),
|
||||
'create': ('zip',),
|
||||
},
|
||||
'gzip': {
|
||||
|
|
|
@ -23,3 +23,11 @@ def create_zip (archive, compression, cmd, *args, **kwargs):
|
|||
cmdlist.append(archive)
|
||||
cmdlist.extend(args)
|
||||
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