diff options
author | Felix Geyer <debfx@fobos.de> | 2013-04-20 21:03:27 +0400 |
---|---|---|
committer | Felix Geyer <debfx@fobos.de> | 2013-04-30 00:31:50 +0400 |
commit | f1bebe904a0e4842df5aeab9a027e1d99608c9ac (patch) | |
tree | b220306374675526fdf9b58e11059289b92ae63b /tests/data | |
parent | e16720d06dfe4dcf62e1c1d649467bfbd7436076 (diff) |
Add tests for broken databases.
Make sure we detect the error and don't crash.
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/BrokenNoEntryUuid.xml | 14 | ||||
-rw-r--r-- | tests/data/BrokenNoGroupUuid.xml | 8 | ||||
-rw-r--r-- | tests/data/BrokenNoRootGroup.xml | 5 |
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/data/BrokenNoEntryUuid.xml b/tests/data/BrokenNoEntryUuid.xml new file mode 100644 index 000000000..38ab96f2e --- /dev/null +++ b/tests/data/BrokenNoEntryUuid.xml @@ -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> diff --git a/tests/data/BrokenNoGroupUuid.xml b/tests/data/BrokenNoGroupUuid.xml new file mode 100644 index 000000000..1e5d32c82 --- /dev/null +++ b/tests/data/BrokenNoGroupUuid.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<KeePassFile> + <Root> + <Group> + <Name>Test</Name> + </Group> + </Root> +</KeePassFile> diff --git a/tests/data/BrokenNoRootGroup.xml b/tests/data/BrokenNoRootGroup.xml new file mode 100644 index 000000000..dcb21c68b --- /dev/null +++ b/tests/data/BrokenNoRootGroup.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<KeePassFile> + <Root> + </Root> +</KeePassFile> |