Remove duplicate tags when saving AIFF files.

Just the same way as WAV already does.
This commit is contained in:
Tsuda Kageyu
2015-11-22 21:03:33 +09:00
parent 2b7d6fef47
commit e44de9f37f
3 changed files with 13 additions and 7 deletions

View File

@ -77,13 +77,18 @@ public:
void testDuplicateID3v2()
{
RIFF::AIFF::File f(TEST_FILE_PATH_C("duplicate_id3v2.aiff"));
ScopedFileCopy copy("duplicate_id3v2", ".aiff");
// duplicate_id3v2.aiff has duplicate ID3v2 tags.
// duplicate_id3v2.aiff has duplicate ID3v2 tag chunks.
// title() returns "Title2" if can't skip the second tag.
RIFF::AIFF::File f(copy.fileName().c_str());
CPPUNIT_ASSERT(f.hasID3v2Tag());
CPPUNIT_ASSERT_EQUAL(String("Title1"), f.tag()->title());
f.save();
CPPUNIT_ASSERT_EQUAL(7030L, f.length());
CPPUNIT_ASSERT_EQUAL(-1L, f.find("Title2"));
}
void testFuzzedFile1()