[gzip-test]
match = *.gz *.tgz
command = gzip --test {files}
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

[bzip2-test]
apt = bzip2
match = *.bz2 *.tbz
command = bzip2 --test {files}
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

[xz-test]
apt = xz-utils
match = *.xz *.txz
command = xz --test {files}
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

[lzma-test]
apt = xz-utils
match = *.lzma
command = lzma --test {files}
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

[lzo-test]
apt = lzop
match = *.lzo
command = lzop --test {files}
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

[lzip-test]
apt = lzip
match = *.lzip
command = lzip --test {files}
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

[unzip-test]
apt = unzip
# Extension list from the File Formats wiki:
# http://fileformats.archiveteam.org/wiki/Category:ZIP_based_file_formats
match =
 *.zip
 *.jar *.apk *.xpi *.ipa *.sb2 *.pk3 *.wz *.love
 *.docx *.xlsx *.pptx *.xlsb
 *.odm *.odt *.ods *.odg *.odp *.odc *.odi *.odf *.odb *.ott *.ots *.otg *.otp *.otc *.oti *.otf *.oth *.fodt *.fods *.fodg *.fodp
 *.ggb *.maff *.cbz *.ora
 *.epub *.oxps *.xps
 *.otx
 *.pkpass
 *.itz
 *.svx
command = unzip -q -t {file} | grep -v '^No errors detected in compressed data of '
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

[7z-test]
apt = p7zip
match = *.7z
command = 7zr t {file} | grep --perl-regexp --null-data --only-matching '(?s)Processing archive: .*\n\nError[^\n]*' | tr -s '\n'
prune = .git .svn .bzr CVS .hg _darcs _FOSSIL_ .sgdrawer

# vim:ft=dosini
