Handle *.epub files
This commit is contained in:
parent
47929ecac8
commit
8ae050701f
|
@ -129,6 +129,7 @@ def add_mimedb_data(mimedb):
|
|||
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', '.epub')
|
||||
|
||||
|
||||
def add_mimetype(mimedb, mimetype, extension):
|
||||
|
|
|
@ -28,6 +28,9 @@ class TestUnzip (ArchiveTest):
|
|||
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')
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program(program)
|
||||
|
@ -38,4 +41,6 @@ class TestUnzip (ArchiveTest):
|
|||
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')
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -124,6 +124,7 @@ class TestMime (unittest.TestCase):
|
|||
self.mime_test_file("t.chm", "application/x-chm")
|
||||
self.mime_test_file("t.chm.foo", "application/x-chm")
|
||||
self.mime_test_file("t.iso", "application/x-iso9660-image")
|
||||
self.mime_test_file("t.epub", "application/zip")
|
||||
|
||||
@needs_program('file')
|
||||
@needs_program('lzip')
|
||||
|
@ -198,3 +199,4 @@ class TestMime (unittest.TestCase):
|
|||
self.mime_test_mimedb("t.adf", "application/x-adf")
|
||||
self.mime_test_mimedb("t.chm", "application/x-chm")
|
||||
self.mime_test_mimedb("t.iso", "application/x-iso9660-image")
|
||||
self.mime_test_mimedb("t.epub", "application/zip")
|
||||
|
|
Loading…
Reference in New Issue