mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Add tests for broken databases.
Make sure we detect the error and don't crash.
This commit is contained in:
14
tests/data/BrokenNoEntryUuid.xml
Normal file
14
tests/data/BrokenNoEntryUuid.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<KeePassFile>
|
||||
<Root>
|
||||
<Group>
|
||||
<UUID>lmU+9n0aeESKZvcEze+bRg==</UUID>
|
||||
<Name>Test</Name>
|
||||
<Entry>
|
||||
<String>
|
||||
<Key>Title</Key>
|
||||
<Value>Sample Entry 1</Value>
|
||||
</String>
|
||||
</Group>
|
||||
</Root>
|
||||
</KeePassFile>
|
||||
8
tests/data/BrokenNoGroupUuid.xml
Normal file
8
tests/data/BrokenNoGroupUuid.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<KeePassFile>
|
||||
<Root>
|
||||
<Group>
|
||||
<Name>Test</Name>
|
||||
</Group>
|
||||
</Root>
|
||||
</KeePassFile>
|
||||
5
tests/data/BrokenNoRootGroup.xml
Normal file
5
tests/data/BrokenNoRootGroup.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<KeePassFile>
|
||||
<Root>
|
||||
</Root>
|
||||
</KeePassFile>
|
||||
Reference in New Issue
Block a user