mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 04:54:19 -04:00
Save ASF attributes larger than 64k to the metadata library object
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1110205 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -19,6 +19,7 @@ class TestASF : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testSaveStream);
|
||||
CPPUNIT_TEST(testSaveLanguage);
|
||||
CPPUNIT_TEST(testDWordTrackNumber);
|
||||
CPPUNIT_TEST(testSaveLargeValue);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -122,6 +123,24 @@ public:
|
||||
delete f;
|
||||
}
|
||||
|
||||
void testSaveLargeValue()
|
||||
{
|
||||
ScopedFileCopy copy("silence-1", ".wma");
|
||||
string newname = copy.fileName();
|
||||
|
||||
ASF::File *f = new ASF::File(newname.c_str());
|
||||
ASF::AttributeList values;
|
||||
ASF::Attribute attr(ByteVector(70000, 'x'));
|
||||
values.append(attr);
|
||||
f->tag()->attributeListMap()["WM/Blob"] = values;
|
||||
f->save();
|
||||
delete f;
|
||||
|
||||
f = new ASF::File(newname.c_str());
|
||||
CPPUNIT_ASSERT_EQUAL(ByteVector(70000, 'x'), f->tag()->attributeListMap()["WM/Blob"][0].toByteVector());
|
||||
delete f;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestASF);
|
||||
|
Reference in New Issue
Block a user