Merge branch 'master' into taglib2

Conflicts:
	taglib/toolkit/tfile.h
This commit is contained in:
Michael Helmling
2012-12-27 11:54:59 +01:00
15 changed files with 60 additions and 58 deletions

View File

@ -24,6 +24,7 @@ class TestFLAC : public CppUnit::TestFixture
CPPUNIT_TEST(testRepeatedSave);
CPPUNIT_TEST(testSaveMultipleValues);
CPPUNIT_TEST(testDict);
CPPUNIT_TEST(testInvalid);
CPPUNIT_TEST_SUITE_END();
public:
@ -231,6 +232,17 @@ public:
CPPUNIT_ASSERT_EQUAL(String("artöst 2"), dict["ARTIST"][1]);
}
void testInvalid()
{
ScopedFileCopy copy("silence-44-s", ".flac");
PropertyMap map;
map["HÄÖ"] = String("bla");
FLAC::File f(copy.fileName().c_str());
PropertyMap invalid = f.setProperties(map);
CPPUNIT_ASSERT_EQUAL(uint(1), invalid.size());
CPPUNIT_ASSERT_EQUAL(uint(0), f.properties().size());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestFLAC);

View File

@ -7,6 +7,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/fcntl.h>
#include <sys/stat.h>
#endif
#include <stdio.h>
#include <string.h>