mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
Merge pull request #683 from TsudaKageyu/save-mp4
Fix saving MP4 files.
This commit is contained in:
@ -31,6 +31,7 @@ class TestMP4 : public CppUnit::TestFixture
|
||||
CPPUNIT_TEST(testCovrRead2);
|
||||
CPPUNIT_TEST(testProperties);
|
||||
CPPUNIT_TEST(testFuzzedFile);
|
||||
CPPUNIT_TEST(testRepeatedSave);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -358,6 +359,17 @@ public:
|
||||
CPPUNIT_ASSERT(f.isValid());
|
||||
}
|
||||
|
||||
void testRepeatedSave()
|
||||
{
|
||||
ScopedFileCopy copy("no-tags", ".m4a");
|
||||
|
||||
MP4::File f(copy.fileName().c_str());
|
||||
f.tag()->setTitle("0123456789");
|
||||
f.save();
|
||||
f.save();
|
||||
CPPUNIT_ASSERT_EQUAL(2862L, f.find("0123456789"));
|
||||
CPPUNIT_ASSERT_EQUAL(-1L, f.find("0123456789", 2863));
|
||||
}
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TestMP4);
|
||||
|
Reference in New Issue
Block a user