mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Test for ID3v1 false positives.
This commit is contained in:
parent
cebaf9a8e2
commit
10721b4b41
@ -29,6 +29,7 @@
|
||||
#include <tstringlist.h>
|
||||
#include <tbytevectorlist.h>
|
||||
#include <tpropertymap.h>
|
||||
#include <apefile.h>
|
||||
#include <apetag.h>
|
||||
#include <tdebug.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user