diff --git a/doc/README.txt b/doc/README.txt index 2bf717b..0a0ce09 100644 --- a/doc/README.txt +++ b/doc/README.txt @@ -3,26 +3,26 @@ Patool Patool is an archive file manager. -Various archive formats can be created, extracted, tested, listed, -searched, repacked and compared with patool. The advantage of patool is its simplicity in -handling archive files without having to remember a myriad of -programs and options. +Various archive formats can be created, extracted, tested, listed, +searched, repacked and compared with patool. The advantage of patool is +its simplicity in handling archive files without having to remember a +myriad of programs and options. The archive format is determined by the file(1) program and as a fallback by the archive file extension. -patool supports 7z (.7z), ACE (.ace), ADF (.adf), ALZIP (.alz), +patool supports 7z (.7z, .cb7), ACE (.ace, .cba), ADF (.adf), ALZIP (.alz), APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), -LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar), -RZIP (.rz), SHN (.shn), TAR (.tar), XZ (.xz), ZIP (.zip, .jar) and -ZOO (.zoo) formats. It relies on helper applications to handle -those archive formats (for example bzip2 for BZIP2 archives). +LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar, .cbr), +RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz), +ZIP (.zip, .jar, .cbz) and ZOO (.zoo) archive formats. +It relies on helper applications to handle those archive formats +(for example bzip2 for BZIP2 archives). -The archive formats TAR, ZIP, BZIP2 and GZIP -are supported natively and do not require helper -applications to be installed. +The archive formats TAR, ZIP, BZIP2 and GZIP are supported natively +and do not require helper applications to be installed. Examples --------- diff --git a/doc/changelog.txt b/doc/changelog.txt index 1312e10..586f2df 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,6 +1,8 @@ 1.11 (released xx.xx.216) * Fix 7z unpacking when only p7zip with /usr/bin/7zr is installed. +* Support comic book archives: .cb7 for 7z, .cba for ACE, .cbr for RAR, + .cbt for TAR and .cbz for ZIP archives. 1.10 (released 10.12.2015) diff --git a/doc/patool.1 b/doc/patool.1 index 0b3f32a..4411050 100644 --- a/doc/patool.1 +++ b/doc/patool.1 @@ -25,12 +25,14 @@ files without having to remember a myriad of programs and options. The archive format is determined by the file(1) program and as a fallback by the archive file extension. .PP -\fBpatool\fP supports 7z (.7z), ACE (.ace), ADF (.adf), ALZIP (.alz), -APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), +\fBpatool\fP supports 7z (.7z, .cb7), ACE (.ace, .cba), ADF (.adf), +ALZIP (.alz), APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), -FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), LZIP (.lz), -LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar), RZIP (.rz), SHN (.shn), -TAR (.tar), XZ (.xz), ZIP (.zip, .jar), ZOO (.zoo) and ZPAQ (.zpaq) formats. +FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, .lzh), +LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR (.rar, .cbr), +RZIP (.rz), SHN (.shn), TAR (.tar, .cbt), XZ (.xz), ZIP (.zip, .jar, .cbz), +ZOO (.zoo) and ZPAQ (.zpaq) archive formats. +.br It relies on helper applications to handle those archive formats (for example bzip2 for BZIP2 archives). .PP diff --git a/doc/patool.txt b/doc/patool.txt index c1ebcd2..e5f56ab 100644 --- a/doc/patool.txt +++ b/doc/patool.txt @@ -20,15 +20,16 @@ DESCRIPTION The archive format is determined by the file(1) program and as a fallback by the archive file extension. - patool supports 7z (.7z), ACE (.ace), ADF (.adf), ALZIP (.alz), - APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), BZIP2 (.bz2), CAB - (.cab), COMPRESS (.Z), CPIO (.cpio), DEB (.deb), DMS (.dms), - FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP (.lrz), LZH (.lha, - .lzh), LZIP (.lz), LZMA (.lzma), LZOP (.lzo), RPM (.rpm), RAR - (.rar), RZIP (.rz), SHN (.shn), TAR (.tar), XZ (.xz), ZIP - (.zip, .jar), ZOO (.zoo) and ZPAQ (.zpaq) formats. It relies - on helper applications to handle those archive formats (for - example bzip2 for BZIP2 archives). + patool supports 7z (.7z, .cb7), ACE (.ace, .cba), ADF (.adf), + ALZIP (.alz), APE (.ape), AR (.a), ARC (.arc), ARJ (.arj), + BZIP2 (.bz2), CAB (.cab), COMPRESS (.Z), CPIO (.cpio), DEB + (.deb), DMS (.dms), FLAC (.flac), GZIP (.gz), ISO (.iso), LRZIP + (.lrz), LZH (.lha, .lzh), LZIP (.lz), LZMA (.lzma), LZOP + (.lzo), RPM (.rpm), RAR (.rar, .cbr), RZIP (.rz), SHN (.shn), + TAR (.tar, .cbt), XZ (.xz), ZIP (.zip, .jar, .cbz), ZOO (.zoo) + and ZPAQ (.zpaq) archive formats. + It relies on helper applications to handle those archive for‐ + mats (for example bzip2 for BZIP2 archives). The archive formats TAR, ZIP, BZIP2 and GZIP are supported natively and do not require helper applications to be diff --git a/patoolib/util.py b/patoolib/util.py index 8a52bb1..d9d033f 100644 --- a/patoolib/util.py +++ b/patoolib/util.py @@ -109,11 +109,14 @@ def add_mimedb_data(mimedb): add_mimetype(mimedb, 'application/x-xz', '.xz') add_mimetype(mimedb, 'application/java-archive', '.jar') add_mimetype(mimedb, 'application/x-rar', '.rar') + add_mimetype(mimedb, 'application/x-rar', '.cbr') add_mimetype(mimedb, 'application/x-7z-compressed', '.7z') + add_mimetype(mimedb, 'application/x-7z-compressed', '.cb7') add_mimetype(mimedb, 'application/x-cab', '.cab') add_mimetype(mimedb, 'application/x-rpm', '.rpm') add_mimetype(mimedb, 'application/x-debian-package', '.deb') add_mimetype(mimedb, 'application/x-ace', '.ace') + add_mimetype(mimedb, 'application/x-ace', '.cba') add_mimetype(mimedb, 'application/x-archive', '.a') add_mimetype(mimedb, 'application/x-alzip', '.alz') add_mimetype(mimedb, 'application/x-arc', '.arc') @@ -125,12 +128,14 @@ def add_mimedb_data(mimedb): add_mimetype(mimedb, 'application/x-dms', '.dms') add_mimetype(mimedb, 'application/x-zip-compressed', '.crx') add_mimetype(mimedb, 'application/x-shar', '.shar') + add_mimetype(mimedb, 'application/x-tar', '.cbt') add_mimetype(mimedb, 'application/x-vhd', '.vhd') add_mimetype(mimedb, 'audio/x-ape', '.ape') add_mimetype(mimedb, 'audio/x-shn', '.shn') add_mimetype(mimedb, 'audio/flac', '.flac') add_mimetype(mimedb, 'application/x-chm', '.chm') add_mimetype(mimedb, 'application/x-iso9660-image', '.iso') + add_mimetype(mimedb, 'application/zip', '.cbz') add_mimetype(mimedb, 'application/zip', '.epub') add_mimetype(mimedb, 'application/zip', '.apk') add_mimetype(mimedb, 'application/zpaq', '.zpaq') diff --git a/tests/archives/test_7z.py b/tests/archives/test_7z.py index 46fd496..a21a19a 100644 --- a/tests/archives/test_7z.py +++ b/tests/archives/test_7z.py @@ -23,7 +23,9 @@ class Test7z (ArchiveTest): @needs_program(program) def test_7z (self): self.archive_commands('t .7z') + self.archive_commands('t .cb7') self.archive_commands('t.zip') + self.archive_commands('t.cbz') self.archive_commands('t.txt.xz', check=Content.Singlefile) self.archive_list('t.txt.gz') self.archive_list('t.txt.bz2') @@ -75,7 +77,9 @@ class Test7z (ArchiveTest): @needs_program(program) def test_7z_file (self): self.archive_commands('t.7z.foo', skip_create=True) + self.archive_commands('t.cb7.foo', skip_create=True) self.archive_commands('t.zip.foo', skip_create=True) + self.archive_commands('t.cbz.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') diff --git a/tests/archives/test_7za.py b/tests/archives/test_7za.py index af3a442..1e7565c 100644 --- a/tests/archives/test_7za.py +++ b/tests/archives/test_7za.py @@ -23,7 +23,9 @@ class Test7za (ArchiveTest): @needs_program(program) def test_p7azip (self): self.archive_commands('t .7z') + self.archive_commands('t .cb7') self.archive_commands('t.zip') + self.archive_commands('t.cbz') self.archive_list('t.txt.gz') self.archive_list('t.txt.bz2') self.archive_list('t.jar') @@ -47,7 +49,9 @@ class Test7za (ArchiveTest): @needs_program(program) def test_7za_file (self): self.archive_commands('t.7z.foo', skip_create=True) + self.archive_commands('t.cb7.foo', skip_create=True) self.archive_commands('t.zip.foo', skip_create=True) + self.archive_commands('t.cbz.foo', skip_create=True) self.archive_list('t.txt.gz.foo') self.archive_list('t.txt.bz2.foo') self.archive_list('t.jar.foo') diff --git a/tests/archives/test_7zr.py b/tests/archives/test_7zr.py index 671e37e..f76adda 100644 --- a/tests/archives/test_7zr.py +++ b/tests/archives/test_7zr.py @@ -23,8 +23,10 @@ class Test7zr (ArchiveTest): @needs_program(program) def test_7zr (self): self.archive_commands('t .7z') + self.archive_commands('t .cb7') @needs_program('file') @needs_program(program) def test_7z_file (self): self.archive_commands('t.7z.foo', skip_create=True) + self.archive_commands('t.cb7.foo', skip_create=True) diff --git a/tests/archives/test_bsdtar.py b/tests/archives/test_bsdtar.py index 028a658..0b82760 100644 --- a/tests/archives/test_bsdtar.py +++ b/tests/archives/test_bsdtar.py @@ -23,6 +23,7 @@ class TestBsdtar (ArchiveTest): @needs_program(program) def test_bsdtar (self): self.archive_commands('t.tar') + self.archive_commands('t.cbt') @needs_codec(program, 'gzip') def test_bsdtar_gz (self): @@ -58,6 +59,7 @@ class TestBsdtar (ArchiveTest): @needs_program(program) def test_bsdtar_file (self): self.archive_commands('t.tar.foo', skip_create=True) + self.archive_commands('t.cbt.foo', skip_create=True) @needs_program('file') @needs_codec(program, 'gzip') diff --git a/tests/archives/test_pytarfile.py b/tests/archives/test_pytarfile.py index 07f1a2c..d4ea580 100644 --- a/tests/archives/test_pytarfile.py +++ b/tests/archives/test_pytarfile.py @@ -22,6 +22,7 @@ class TestPytarfile (ArchiveTest): def test_py_tarfile (self): self.archive_commands('t.tar') + self.archive_commands('t.cbt') def test_py_tarfile_gz (self): self.archive_commands('t.tar.gz') @@ -34,6 +35,7 @@ class TestPytarfile (ArchiveTest): @needs_program('file') def test_py_tarfile_file (self): self.archive_commands('t.tar.foo', skip_create=True) + self.archive_commands('t.cbt.foo', skip_create=True) @needs_program('file') def test_py_tarfile_gz_file (self): @@ -44,4 +46,3 @@ class TestPytarfile (ArchiveTest): def test_py_tarfile_bz2_file (self): self.archive_commands('t.tar.bz2.foo', skip_create=True) self.archive_commands('t.tbz2.foo', skip_create=True) - diff --git a/tests/archives/test_pyzipfile.py b/tests/archives/test_pyzipfile.py index 8235622..7d2b912 100644 --- a/tests/archives/test_pyzipfile.py +++ b/tests/archives/test_pyzipfile.py @@ -22,8 +22,10 @@ class TestPyzipfile (ArchiveTest): def test_py_zipfile(self): self.archive_commands('t.zip') + self.archive_commands('t.cbz') @needs_program('file') def test_py_zipfile_file(self): self.archive_commands('t.zip.foo', skip_create=True) + self.archive_commands('t.cbz.foo', skip_create=True) diff --git a/tests/archives/test_rar.py b/tests/archives/test_rar.py index c4c02f8..7a1e188 100644 --- a/tests/archives/test_rar.py +++ b/tests/archives/test_rar.py @@ -23,9 +23,11 @@ class TestRar (ArchiveTest): @needs_program(program) def test_rar(self): self.archive_commands('t.rar') + self.archive_commands('t.cbr') @needs_program('file') @needs_program(program) def test_rar_file(self): self.archive_commands('t.rar.foo', skip_create=True) + self.archive_commands('t.cbr.foo', skip_create=True) diff --git a/tests/archives/test_star.py b/tests/archives/test_star.py index ae77c6b..3542fa9 100644 --- a/tests/archives/test_star.py +++ b/tests/archives/test_star.py @@ -23,6 +23,7 @@ class TestStar (ArchiveTest): @needs_program(program) def test_star (self): self.archive_commands('t.tar') + self.archive_commands('t.cbt') @needs_codec(program, 'gzip') def test_star_gz (self): @@ -57,6 +58,7 @@ class TestStar (ArchiveTest): @needs_program(program) def test_star_file (self): self.archive_commands('t.tar.foo', skip_create=True) + self.archive_commands('t.cbt.foo', skip_create=True) @needs_program('file') @needs_codec(program, 'gzip') @@ -91,4 +93,3 @@ class TestStar (ArchiveTest): @needs_codec(program, 'xz') def test_star_xz_file (self): self.archive_commands('t.tar.xz.foo', skip_create=True) - diff --git a/tests/archives/test_tar.py b/tests/archives/test_tar.py index 5746255..5b4527b 100644 --- a/tests/archives/test_tar.py +++ b/tests/archives/test_tar.py @@ -23,6 +23,7 @@ class TestTar (ArchiveTest): @needs_program(program) def test_tar (self): self.archive_commands('t.tar') + self.archive_commands('t.cbt') @needs_codec(program, 'gzip') def test_tar_gz (self): @@ -59,6 +60,7 @@ class TestTar (ArchiveTest): @needs_program(program) def test_tar_file (self): self.archive_commands('t.tar.foo', skip_create=True) + self.archive_commands('t.cbt.foo', skip_create=True) @needs_program('file') @needs_codec(program, 'gzip') @@ -96,4 +98,3 @@ class TestTar (ArchiveTest): @needs_codec(program, 'xz') def test_tar_xz_file (self): self.archive_commands('t.tar.xz.foo', skip_create=True) - diff --git a/tests/archives/test_unace.py b/tests/archives/test_unace.py index e958bd4..e197485 100644 --- a/tests/archives/test_unace.py +++ b/tests/archives/test_unace.py @@ -25,6 +25,9 @@ class TestUnace (ArchiveTest): self.archive_list('t.ace') self.archive_test('t.ace') self.archive_extract('t.ace') + self.archive_list('t.cba') + self.archive_test('t.cba') + self.archive_extract('t.cba') @needs_program('file') @needs_program(program) @@ -32,4 +35,6 @@ class TestUnace (ArchiveTest): self.archive_list('t.ace.foo') self.archive_test('t.ace.foo') self.archive_extract('t.ace.foo') - + self.archive_list('t.cba.foo') + self.archive_test('t.cba.foo') + self.archive_extract('t.cba.foo') diff --git a/tests/archives/test_unzip.py b/tests/archives/test_unzip.py index 87709b7..deba97e 100644 --- a/tests/archives/test_unzip.py +++ b/tests/archives/test_unzip.py @@ -25,12 +25,16 @@ class TestUnzip (ArchiveTest): self.archive_extract('t.zip', check=None) self.archive_list('t.zip') self.archive_test('t.zip') + self.archive_extract('t.cbz', check=None) + self.archive_list('t.cbz') + self.archive_test('t.cbz') self.archive_extract('t.jar', check=None) self.archive_list('t.jar') self.archive_test('t.jar') self.archive_extract('t.epub', check=None) self.archive_list('t.epub') self.archive_test('t.epub') + self.archive_extract('t.apk', check=None) self.archive_list('t.apk') self.archive_test('t.apk') @@ -40,11 +44,15 @@ class TestUnzip (ArchiveTest): self.archive_extract('t.zip.foo', check=None) self.archive_list('t.zip.foo') self.archive_test('t.zip.foo') + self.archive_extract('t.cbz.foo', check=None) + self.archive_list('t.cbz.foo') + self.archive_test('t.cbz.foo') self.archive_extract('t.jar.foo', check=None) self.archive_list('t.jar.foo') self.archive_test('t.jar.foo') self.archive_extract('t.epub.foo', check=None) self.archive_list('t.epub.foo') self.archive_test('t.epub.foo') + self.archive_extract('t.apk.foo', check=None) self.archive_list('t.apk.foo') self.archive_test('t.apk.foo') diff --git a/tests/archives/test_zip.py b/tests/archives/test_zip.py index 6e0e7a5..3fade9b 100644 --- a/tests/archives/test_zip.py +++ b/tests/archives/test_zip.py @@ -24,8 +24,20 @@ class TestZip (ArchiveTest): def test_zip (self): self.archive_create('t.zip') self.archive_test('t.zip') + self.archive_create('t.cbz') + self.archive_test('t.cbz') + self.archive_create('t.apk') + self.archive_test('t.apk') + self.archive_create('t.jar') + self.archive_test('t.jar') + self.archive_create('t.epub') + self.archive_test('t.epub') @needs_program('file') @needs_program(program) def test_zip_file (self): self.archive_test('t.zip.foo') + self.archive_test('t.cbz.foo') + self.archive_test('t.apk.foo') + self.archive_test('t.jar.foo') + self.archive_test('t.epub.foo') diff --git a/tests/data/t .cb7 b/tests/data/t .cb7 new file mode 100644 index 0000000..7149c7f Binary files /dev/null and b/tests/data/t .cb7 differ diff --git a/tests/data/t.cb7.foo b/tests/data/t.cb7.foo new file mode 100644 index 0000000..7149c7f Binary files /dev/null and b/tests/data/t.cb7.foo differ diff --git a/tests/data/t.cba b/tests/data/t.cba new file mode 100644 index 0000000..80ce57d Binary files /dev/null and b/tests/data/t.cba differ diff --git a/tests/data/t.cba.foo b/tests/data/t.cba.foo new file mode 100644 index 0000000..80ce57d Binary files /dev/null and b/tests/data/t.cba.foo differ diff --git a/tests/data/t.cbr b/tests/data/t.cbr new file mode 100644 index 0000000..82c4a6a Binary files /dev/null and b/tests/data/t.cbr differ diff --git a/tests/data/t.cbr.foo b/tests/data/t.cbr.foo new file mode 100644 index 0000000..82c4a6a Binary files /dev/null and b/tests/data/t.cbr.foo differ diff --git a/tests/data/t.cbt b/tests/data/t.cbt new file mode 100644 index 0000000..3adf9da Binary files /dev/null and b/tests/data/t.cbt differ diff --git a/tests/data/t.cbt.foo b/tests/data/t.cbt.foo new file mode 100644 index 0000000..3adf9da Binary files /dev/null and b/tests/data/t.cbt.foo differ diff --git a/tests/data/t.cbz b/tests/data/t.cbz new file mode 100644 index 0000000..6334377 Binary files /dev/null and b/tests/data/t.cbz differ diff --git a/tests/data/t.cbz.foo b/tests/data/t.cbz.foo new file mode 100644 index 0000000..6334377 Binary files /dev/null and b/tests/data/t.cbz.foo differ diff --git a/tests/test_mime.py b/tests/test_mime.py index ce4e6b9..197c130 100644 --- a/tests/test_mime.py +++ b/tests/test_mime.py @@ -46,7 +46,8 @@ class TestMime (unittest.TestCase): @needs_program('file') def test_mime_file (self): self.mime_test_file("t .7z", "application/x-7z-compressed") - self.mime_test_file("t.7z.foo", "application/x-7z-compressed") + self.mime_test_file("t .cb7", "application/x-7z-compressed") + self.mime_test_file("t.cb7.foo", "application/x-7z-compressed") self.mime_test_file("t.arj", "application/x-arj") self.mime_test_file("t.arj.foo", "application/x-arj") self.mime_test_file("t.txt.bz2", "application/x-bzip2") @@ -69,10 +70,14 @@ class TestMime (unittest.TestCase): self.mime_test_file("t.txt.lzo.foo", "application/x-lzop") self.mime_test_file("t.rar", "application/x-rar") self.mime_test_file("t.rar.foo", "application/x-rar") + self.mime_test_file("t.cbr", "application/x-rar") + self.mime_test_file("t.cbr.foo", "application/x-rar") self.mime_test_file("t.rpm", "application/x-rpm") self.mime_test_file("t.rpm.foo", "application/x-rpm") self.mime_test_file("t.tar", "application/x-tar") self.mime_test_file("t.tar.foo", "application/x-tar") + self.mime_test_file("t.cbt", "application/x-tar") + self.mime_test_file("t.cbt.foo", "application/x-tar") self.mime_test_file("t.tar.lz", "application/x-tar", "lzip") self.mime_test_file("t.tar.bz2", "application/x-tar", "bzip2") self.mime_test_file("t.tbz2", "application/x-tar", "bzip2") @@ -92,8 +97,12 @@ class TestMime (unittest.TestCase): self.mime_test_file("t.jar.foo", "application/zip") self.mime_test_file("t.zip", "application/zip") self.mime_test_file("t.zip.foo", "application/zip") + self.mime_test_file("t.cbz", "application/zip") + self.mime_test_file("t.cbz.foo", "application/zip") self.mime_test_file("t.ace", "application/x-ace") self.mime_test_file("t.ace.foo", "application/x-ace") + self.mime_test_file("t.cba", "application/x-ace") + self.mime_test_file("t.cba.foo", "application/x-ace") self.mime_test_file("t.txt.a", "application/x-archive") self.mime_test_file("t.txt.a.foo", "application/x-archive") self.mime_test_file("t.lha", "application/x-lha") @@ -159,9 +168,11 @@ class TestMime (unittest.TestCase): def test_mime_mimedb (self): self.mime_test_mimedb("t .7z", "application/x-7z-compressed") + self.mime_test_mimedb("t .cb7", "application/x-7z-compressed") self.mime_test_mimedb("t.arj", "application/x-arj") self.mime_test_mimedb("t .bz2", "application/x-bzip2") self.mime_test_mimedb("t.cab", "application/x-cab") + self.mime_test_mimedb("t.cbr", ("application/rar", "application/x-rar")) self.mime_test_mimedb("t.cpio", "application/x-cpio") self.mime_test_mimedb("t.deb", "application/x-debian-package") self.mime_test_mimedb("t.gz", "application/gzip") @@ -172,6 +183,7 @@ class TestMime (unittest.TestCase): self.mime_test_mimedb("t.rar", ("application/rar", "application/x-rar")) self.mime_test_mimedb("t.rpm", ("application/x-redhat-package-manager", "application/x-rpm")) self.mime_test_mimedb("t.tar", "application/x-tar") + self.mime_test_mimedb("t.cbt", "application/x-tar") self.mime_test_mimedb("t.tar.bz2", "application/x-tar", "bzip2") self.mime_test_mimedb("t.tar.gz", "application/x-tar", "gzip") self.mime_test_mimedb("t.tar.lzma", "application/x-tar", "lzma") @@ -186,7 +198,9 @@ class TestMime (unittest.TestCase): self.mime_test_mimedb("t .xz", "application/x-xz") self.mime_test_mimedb("t.Z", "application/x-compress") self.mime_test_mimedb("t.zip", ("application/zip", "application/x-zip-compressed")) + self.mime_test_mimedb("t.cbz", ("application/zip", "application/x-zip-compressed")) self.mime_test_mimedb("t.ace", "application/x-ace") + self.mime_test_mimedb("t.cba", "application/x-ace") self.mime_test_mimedb("t.a", "application/x-archive") self.mime_test_mimedb("t.lha", "application/x-lha") self.mime_test_mimedb("t.lzh", "application/x-lzh")