Add zip test command.

This commit is contained in:
Bastian Kleineidam 2012-11-18 20:43:04 +01:00
parent e92fdd3d58
commit b341a83cde
2 changed files with 9 additions and 1 deletions

View File

@ -136,7 +136,7 @@ ArchivePrograms = {
None: ('7z', '7za', 'py_zipfile'),
'extract': ('unzip',),
'list': ('unzip',),
'test': ('unzip',),
'test': ('zip', 'unzip',),
'create': ('zip',),
},
'gzip': {

View File

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