From 448eb7c720d47bddad0d5427aa8b8b41c0e99382 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Thu, 17 May 2012 14:11:36 +0200 Subject: [PATCH] Add mime type for .shn files. --- patoolib/util.py | 1 + tests/data/t.shn | Bin 0 -> 1005 bytes tests/test_mime.py | 4 ++++ 3 files changed, 5 insertions(+) create mode 100644 tests/data/t.shn 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 0000000000000000000000000000000000000000..f11d1318886b4cfd46a3dfd2f9655f685b06b5e4 GIT binary patch literal 1005 zcmbW0J!lhQ7{{OY(l*yx(>qF}P^!5MBEi8b4i>@7nb0o{mo|?Tu|hkjR0l0|5r=C% z@%%vS(BdLos)6*4R1`!JCvk9a&>f*z_AJ6mt{{Qzma+#Pq zb4vR;{i*ZE(4)%W-Qsh1wMl!BtrgF{`*3g0BF|3k(%ZGG_dUBe8MJH76xcf#yDL}D zcX)Q!Vv;#ul89#&p6Ta}F}7A;-dN)i#cqrm9R7@qLTc+=<9v)!jO6cj>SPkwij)gn z&n)u{3gfE!uNZ*`y2U{7n8J=^q_V|+NJf=)VI9@=fc;;Cxg?h)yO}5YR^QSM-)foA zoh`nlo%1a^Y54To(z8b$Uegf3<8XQvTt{0yB}~*8in>jL)t+7TP~_pQ>b9s8$q;4f z3AW>)<4ip+_SDP}^i?TQg$Z&QX2K{;RHG$%4PQ!`ZO(H{QWQp>3>BS_F`1B=5WoFY z;Ts?>@_4b{Ut(8%LN}$HgLLMgyu;j9l`A#5Fao1`L1{uMtN5q%RXFL&GV>ss8qMd2 l1=h|u9w_!l@VHaY+R literal 0 HcmV?d00001 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)