summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2015-02-05 14:50:50 +0100
committerGravatar Nikias Bassen2015-02-05 14:50:50 +0100
commit43ae9d35badc43a5f14f439a54d761988c73e167 (patch)
tree8beb16c675830b6241ada37b6204cf20dbbd5658
parent40cf910a621445bf5c2638f39d245fc7c3c8f72a (diff)
downloadlibplist-43ae9d35badc43a5f14f439a54d761988c73e167.tar.gz
libplist-43ae9d35badc43a5f14f439a54d761988c73e167.tar.bz2
test: Add more test cases covering binary plist issues
-rw-r--r--test/Makefile.am7
-rw-r--r--test/data/malformed_dict.bplistbin0 -> 77 bytes
-rw-r--r--test/data/order.bplistbin0 -> 77 bytes
-rw-r--r--test/data/order.plist27
-rw-r--r--test/data/recursion.bplistbin0 -> 60 bytes
5 files changed, 32 insertions, 2 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 77122be..1f084db 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -26,9 +26,12 @@ TESTS = \
timezone2.test \
signedunsigned1.test \
signedunsigned2.test \
- hex.test
+ hex.test \
+ order.test \
+ recursion.test \
+ malformed_dict.test
-EXTRA_DIST = $(TESTS) data/1.plist data/2.plist data/3.plist data/4.plist data/5.plist data/6.plist data/7.plist data/signed.plist data/signed.bplist data/unsigned.plist data/unsigned.bplist data/hex.plist
+EXTRA_DIST = $(TESTS) data/1.plist data/2.plist data/3.plist data/4.plist data/5.plist data/6.plist data/7.plist data/signed.plist data/signed.bplist data/unsigned.plist data/unsigned.bplist data/hex.plist data/order.bplist data/recursion.bplist data/malformed_dict.bplist
TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) top_builddir=$(top_builddir)
diff --git a/test/data/malformed_dict.bplist b/test/data/malformed_dict.bplist
new file mode 100644
index 0000000..0de4cd7
--- /dev/null
+++ b/test/data/malformed_dict.bplist
Binary files differ
diff --git a/test/data/order.bplist b/test/data/order.bplist
new file mode 100644
index 0000000..5ea86f8
--- /dev/null
+++ b/test/data/order.bplist
Binary files differ
diff --git a/test/data/order.plist b/test/data/order.plist
new file mode 100644
index 0000000..b2cbdcb
--- /dev/null
+++ b/test/data/order.plist
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>test</key>
+ <array>
+ <integer>1</integer>
+ <integer>1</integer>
+ </array>
+ <key>foo</key>
+ <array>
+ <array>
+ <integer>1</integer>
+ </array>
+ <dict>
+ <key>test</key>
+ <string>foo</string>
+ </dict>
+ <array>
+ <integer>1</integer>
+ </array>
+ <array>
+ <integer>1</integer>
+ </array>
+ </array>
+</dict>
+</plist>
diff --git a/test/data/recursion.bplist b/test/data/recursion.bplist
new file mode 100644
index 0000000..3f4b42a
--- /dev/null
+++ b/test/data/recursion.bplist
Binary files differ