diff options
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rw-r--r-- | test/data/empty_keys.plist | 8 | ||||
-rwxr-xr-x | test/empty_keys.test | 12 |
3 files changed, 22 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index f100e54..6f43929 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -32,9 +32,10 @@ TESTS = \ order.test \ recursion.test \ entities.test \ + empty_keys.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 data/order.bplist data/recursion.bplist data/entities.plist data/malformed_dict.bplist +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/entities.plist data/empty_keys.plist data/malformed_dict.bplist TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) top_builddir=$(top_builddir) diff --git a/test/data/empty_keys.plist b/test/data/empty_keys.plist new file mode 100644 index 0000000..a0107b4 --- /dev/null +++ b/test/data/empty_keys.plist @@ -0,0 +1,8 @@ +<plist version="1.0"> +<dict> + <key></key> + <string>empty key</string> + <key><!-- comment --></key> + <string>empty key with comment</string> +</dict> +</plist> diff --git a/test/empty_keys.test b/test/empty_keys.test new file mode 100755 index 0000000..4291e8c --- /dev/null +++ b/test/empty_keys.test @@ -0,0 +1,12 @@ +## -*- sh -*- + +set -e + +DATASRC=$top_srcdir/test/data +TESTFILE=empty_keys.plist +DATAIN0=$DATASRC/$TESTFILE +DATAOUT0=$top_builddir/test/data/$TESTFILE.bin + +$top_builddir/tools/plistutil -i $DATAIN0 -o $DATAOUT0 + +$top_builddir/test/plist_cmp $DATAIN0 $DATAOUT0 |