diff --git a/patoolib/util.py b/patoolib/util.py index be3d252..1a15288 100644 --- a/patoolib/util.py +++ b/patoolib/util.py @@ -52,6 +52,7 @@ mimedb.add_type('application/x-zoo', '.zoo', strict=False) mimedb.add_type('application/x-dms', '.dms', strict=False) mimedb.add_type('application/x-zip-compressed', '.crx', strict=False) mimedb.add_type('audio/x-ape', '.ape', strict=False) +mimedb.add_type('audio/x-shn', '.shn', strict=False) class PatoolError (StandardError): diff --git a/tests/data/t.shn b/tests/data/t.shn new file mode 100644 index 0000000..f11d131 Binary files /dev/null and b/tests/data/t.shn differ diff --git a/tests/test_mime.py b/tests/test_mime.py index 2fd03a8..d6dea11 100644 --- a/tests/test_mime.py +++ b/tests/test_mime.py @@ -118,6 +118,9 @@ class TestMime (unittest.TestCase): self.mime_test_file("t.dms.foo", "application/x-dms", None) self.mime_test_file("t.ape", "audio/x-ape", None) self.mime_test_file("t.ape.foo", "audio/x-ape", None) + # file(1) does not recognize .shn files + #self.mime_test_file("t.shn", "audio/x-shn", None) + #self.mime_test_file("t.shn.foo", "audio/x-shn", None) @needs_program('file') @needs_program('lzip') @@ -186,3 +189,4 @@ class TestMime (unittest.TestCase): self.mime_test_mimedb("t.zoo", "application/x-zoo", None) self.mime_test_mimedb("t.dms", "application/x-dms", None) self.mime_test_mimedb("t.ape", "audio/x-ape", None) + self.mime_test_mimedb("t.shn", "audio/x-shn", None)