KeePass2XmlReader: Don't fail wheh nreading empty UUIDs.

Closes #298
This commit is contained in:
Felix Geyer 2015-07-13 21:00:12 +02:00
parent 154f1673e9
commit c6105a08ab
3 changed files with 19 additions and 2 deletions

View file

@ -395,6 +395,19 @@ void TestKeePass2XmlReader::testBroken_data()
QTest::newRow("BrokenDeletedObjects (not strict)") << "BrokenDeletedObjects" << false << false;
}
void TestKeePass2XmlReader::testEmptyUuids()
{
KeePass2XmlReader reader;
reader.setStrictMode(true);
QString xmlFile = QString("%1/%2.xml").arg(KEEPASSX_TEST_DATA_DIR, "EmptyUuids");
QVERIFY(QFile::exists(xmlFile));
QScopedPointer<Database> db(reader.readDatabase(xmlFile));
if (reader.hasError()) {
qWarning("Reader error: %s", qPrintable(reader.errorString()));
}
QVERIFY(!reader.hasError());
}
void TestKeePass2XmlReader::cleanupTestCase()
{
delete m_db;