Raise error if we don't find exactly one root group.
This commit is contained in:
@@ -370,6 +370,8 @@ void TestKeePass2XmlReader::testBroken_data()
|
||||
QTest::newRow("BrokenNoGroupUuid") << "BrokenNoGroupUuid";
|
||||
QTest::newRow("BrokenNoEntryUuid") << "BrokenNoEntryUuid";
|
||||
QTest::newRow("BrokenNoRootGroup") << "BrokenNoRootGroup";
|
||||
QTest::newRow("BrokenTwoRoots") << "BrokenTwoRoots";
|
||||
QTest::newRow("BrokenTwoRootGroups") << "BrokenTwoRootGroups";
|
||||
}
|
||||
|
||||
void TestKeePass2XmlReader::cleanupTestCase()
|
||||
|
||||
13
tests/data/BrokenTwoRootGroups.xml
Normal file
13
tests/data/BrokenTwoRootGroups.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<KeePassFile>
|
||||
<Root>
|
||||
<Group>
|
||||
<UUID>lmU+9n0aeESKZvcEze+bRg==</UUID>
|
||||
<Name>Test</Name>
|
||||
</Group>
|
||||
<Group>
|
||||
<UUID>AaUYVdXsI02h4T1RiAlgtg==</UUID>
|
||||
<Name>Test</Name>
|
||||
</Group>
|
||||
</Root>
|
||||
</KeePassFile>
|
||||
15
tests/data/BrokenTwoRoots.xml
Normal file
15
tests/data/BrokenTwoRoots.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<KeePassFile>
|
||||
<Root>
|
||||
<Group>
|
||||
<UUID>lmU+9n0aeESKZvcEze+bRg==</UUID>
|
||||
<Name>Test</Name>
|
||||
</Group>
|
||||
</Root>
|
||||
<Root>
|
||||
<Group>
|
||||
<UUID>AaUYVdXsI02h4T1RiAlgtg==</UUID>
|
||||
<Name>Test</Name>
|
||||
</Group>
|
||||
</Root>
|
||||
</KeePassFile>
|
||||
Reference in New Issue
Block a user