diff --git a/tests/test_apetag.cpp b/tests/test_apetag.cpp index 2225ccbd..a39e237c 100644 --- a/tests/test_apetag.cpp +++ b/tests/test_apetag.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -46,6 +47,7 @@ class TestAPETag : public CppUnit::TestFixture CPPUNIT_TEST(testPropertyInterface2); CPPUNIT_TEST(testInvalidKeys); CPPUNIT_TEST(testTextBinary); + CPPUNIT_TEST(testID3v1Collision); CPPUNIT_TEST_SUITE_END(); public: @@ -165,6 +167,24 @@ public: CPPUNIT_ASSERT_EQUAL(ByteVector(), item.binaryData()); } + void testID3v1Collision() + { + ScopedFileCopy copy("no-tags", ".mpc"); + string newname = copy.fileName(); + + { + APE::File f(newname.c_str()); + f.APETag(true)->setArtist("Filltointersect "); + f.APETag()->setTitle("Filltointersect "); + f.save(); + } + + { + APE::File f(newname.c_str()); + CPPUNIT_ASSERT(!f.hasID3v1Tag()); + } + } + }; CPPUNIT_TEST_SUITE_REGISTRATION(TestAPETag);