TagStream, decoder/Thread, ...: ignore MIME type parameters for matching plugins
This commit is contained in:
28
test/MimeTypeTest.hxx
Normal file
28
test/MimeTypeTest.hxx
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Unit tests for src/util/
|
||||
*/
|
||||
|
||||
#include "check.h"
|
||||
#include "util/MimeType.hxx"
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
class MimeTypeTest : public CppUnit::TestFixture {
|
||||
CPPUNIT_TEST_SUITE(MimeTypeTest);
|
||||
CPPUNIT_TEST(TestBase);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void TestBase() {
|
||||
CPPUNIT_ASSERT("" == GetMimeTypeBase(""));
|
||||
CPPUNIT_ASSERT("" == GetMimeTypeBase(";"));
|
||||
CPPUNIT_ASSERT("foo" == GetMimeTypeBase("foo"));
|
||||
CPPUNIT_ASSERT("foo/bar" == GetMimeTypeBase("foo/bar"));
|
||||
CPPUNIT_ASSERT("foo/bar" == GetMimeTypeBase("foo/bar;"));
|
||||
CPPUNIT_ASSERT("foo/bar" == GetMimeTypeBase("foo/bar; x=y"));
|
||||
CPPUNIT_ASSERT("foo/bar" == GetMimeTypeBase("foo/bar;x=y"));
|
||||
}
|
||||
};
|
@@ -6,6 +6,7 @@
|
||||
#include "DivideStringTest.hxx"
|
||||
#include "SplitStringTest.hxx"
|
||||
#include "UriUtilTest.hxx"
|
||||
#include "MimeTypeTest.hxx"
|
||||
#include "TestCircularBuffer.hxx"
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
@@ -18,6 +19,7 @@
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(DivideStringTest);
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(SplitStringTest);
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(UriUtilTest);
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(MimeTypeTest);
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestCircularBuffer);
|
||||
|
||||
int
|
||||
|
Reference in New Issue
Block a user