diff --git a/tests/test_wav.cpp b/tests/test_wav.cpp index e2463790..24bb02c5 100644 --- a/tests/test_wav.cpp +++ b/tests/test_wav.cpp @@ -188,7 +188,10 @@ public: void testDuplicateTags() { - RIFF::WAV::File f(TEST_FILE_PATH_C("duplicate_tags.wav")); + ScopedFileCopy copy("duplicate_tags", ".wav"); + + RIFF::WAV::File f(copy.fileName().c_str()); + CPPUNIT_ASSERT_EQUAL(17052L, f.length()); // duplicate_tags.wav has duplicate ID3v2/INFO tags. // title() returns "Title2" if can't skip the second tag. @@ -198,6 +201,10 @@ public: CPPUNIT_ASSERT(f.hasInfoTag()); CPPUNIT_ASSERT_EQUAL(String("Title1"), f.InfoTag()->title()); + + f.save(); + CPPUNIT_ASSERT_EQUAL(15898L, f.length()); + CPPUNIT_ASSERT_EQUAL(-1L, f.find("Title2")); } void testFuzzedFile1()