diff options
author | Nikias Bassen | 2017-01-02 02:06:39 +0100 |
---|---|---|
committer | Nikias Bassen | 2017-01-02 02:06:39 +0100 |
commit | 552801556f8537bcdeee2cc93e347a35a0847f7f (patch) | |
tree | 605c29bd707a4418ce2fa8ad8bbe4abfd64d3581 /test | |
parent | 1cdb888575c6fc53fabe3575534ba99e3bb2c153 (diff) | |
download | libplist-552801556f8537bcdeee2cc93e347a35a0847f7f.tar.gz libplist-552801556f8537bcdeee2cc93e347a35a0847f7f.tar.bz2 |
test: Add new test case for entities
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rw-r--r-- | test/data/entities.plist | 57 | ||||
-rwxr-xr-x | test/entities.test | 12 |
3 files changed, 71 insertions, 1 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 7113a55..f100e54 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -31,9 +31,10 @@ TESTS = \ hex.test \ order.test \ recursion.test \ + entities.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/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/malformed_dict.bplist TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) top_builddir=$(top_builddir) diff --git a/test/data/entities.plist b/test/data/entities.plist new file mode 100644 index 0000000..d7655d6 --- /dev/null +++ b/test/data/entities.plist @@ -0,0 +1,57 @@ +<plist version="1.0"> +<dict> + <key>some test entitites</key> + <dict> + <key>copyright</key> + <string>©</string> + <key>multiple entitites</key> + <string>⼠⼡⼢</string> + <key>multiple entitites with characters inbetween</key> + <string>a⼣b⼤c⼥d</string> + </dict> + <key>one byte entity</key> + <dict> + <key>one byte entity</key> + <string>@</string> + <key>one byte entity with text after</key> + <string>@z</string> + <key>one byte entity with text before</key> + <string>a@</string> + <key>one byte entity with text before & after</key> + <string>a@z</string> + </dict> + <key>two-byte utf-8</key> + <dict> + <key>two-byte utf-8</key> + <string>Ä</string> + <key>two-byte utf-8 with text after</key> + <string>Ëyz</string> + <key>two-byte utf-8 with text before</key> + <string>abÖ</string> + <key>two-byte utf-8 with text before & after</key> + <string>abÜyz</string> + </dict> + <key>three byte utf-8</key> + <dict> + <key>three byte utf-8</key> + <string>¢</string> + <key>three byte utf-8 with text after</key> + <string>£xyz</string> + <key>three byte utf-8 with text before</key> + <string>abc¥</string> + <key>three byte utf-8 with text before & after</key> + <string>abc₩xyz</string> + </dict> + <key>four byte utf-8</key> + <dict> + <key>four byte utf-8</key> + <string>𝕢</string> + <key>four byte utf-8 with text after</key> + <string>𝕣wxyz</string> + <key>four byte utf-8 with text before</key> + <string>abcd𝕤</string> + <key>four byte utf-8 with text before & after</key> + <string>abcd𝕥wxyz</string> + </dict> +</dict> +</plist> diff --git a/test/entities.test b/test/entities.test new file mode 100755 index 0000000..b87e4c7 --- /dev/null +++ b/test/entities.test @@ -0,0 +1,12 @@ +## -*- sh -*- + +set -e + +DATASRC=$top_srcdir/test/data +TESTFILE=entities.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 |