diff --git a/tests/data/t.rar.gz b/tests/data/t.rar.gz new file mode 100644 index 0000000..ccde84c Binary files /dev/null and b/tests/data/t.rar.gz differ diff --git a/tests/data/t.rar.gz.foo b/tests/data/t.rar.gz.foo new file mode 100644 index 0000000..ccde84c Binary files /dev/null and b/tests/data/t.rar.gz.foo differ diff --git a/tests/test_mime.py b/tests/test_mime.py index 8b93ce0..a23c81e 100644 --- a/tests/test_mime.py +++ b/tests/test_mime.py @@ -150,6 +150,12 @@ class TestMime (unittest.TestCase): self.mime_test_file("t.tar.bz2.foo", "application/x-tar", "bzip2") self.mime_test_file("t.tbz2.foo", "application/x-tar", "bzip2") + @needs_program('file') + def test_nested_gzip (self): + # Ensure that a file that doesn't natively support encoding does not see the encoding + self.mime_test_file("t.rar.gz", "application/gzip") + self.mime_test_file("t.rar.gz.foo", "application/gzip") + @needs_program('file') @needs_program('gzip') def test_mime_file_gzip (self):