I've found that the test case *eu.medsea.mimeutil.detector.OpendesktopMimeDetectorTest* might fail on Linux because it picks up additional mime types from the operating systems mime.cache file.
I've patched our branch of mime-utils - see for a version that instead of *assertEquals(mimeTypes.toString(), "text/plain")* uses *assertContains(mimeTypes, "text/plain")* - where:
Note that this file is per mime-utils 2.1.2 as we've not yet merged in the changes from 2.1.3, I can see from the source of 2.1.3 that your current code also tests a few additional mime types like *text/x-readme*.
I also had to change *testGetDescription()* to not test the version number as I got back 1.2 instead of 1.1 on Ubuntu 9.10 x64.
Anyway, thanks for a great project. is a proud user of mime-utils.
Thanks very much for the comments. I will take a look at these issues and possibly change the test cases and or code for the future version 3.0 in accordance with your findings.
If it's OK with you, we would also like to put a link to your project from the mime-util site.
Regards
Steven McArdle
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I've found that the test case *eu.medsea.mimeutil.detector.OpendesktopMimeDetectorTest* might fail on Linux because it picks up additional mime types from the operating systems mime.cache file.
I've patched our branch of mime-utils - see for a version that instead of *assertEquals(mimeTypes.toString(), "text/plain")* uses *assertContains(mimeTypes, "text/plain")* - where:
public static void assertContains(Object expected, `Collection collection) {
assertTrue("Did not contain " + expected + ", but: " + collection,
collection.contains(expected));
}
Note that this file is per mime-utils 2.1.2 as we've not yet merged in the changes from 2.1.3, I can see from the source of 2.1.3 that your current code also tests a few additional mime types like *text/x-readme*.
I also had to change *testGetDescription()* to not test the version number as I got back 1.2 instead of 1.1 on Ubuntu 9.10 x64.
Anyway, thanks for a great project. is a proud user of mime-utils.
: http://code.google.com/p/taverna/source/browse/taverna/utils/eu.medsea.mimeutil.mime-util/trunk/src/test/java/eu/medsea/mimeutil/detector/OpendesktopMimeDetectorTest.java
: http://www.taverna.org.uk/
Thanks very much for the comments. I will take a look at these issues and possibly change the test cases and or code for the future version 3.0 in accordance with your findings.
If it's OK with you, we would also like to put a link to your project from the mime-util site.
Regards
Steven McArdle
Feel free to link! :)