From 552801556f8537bcdeee2cc93e347a35a0847f7f Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 2 Jan 2017 02:06:39 +0100 Subject: test: Add new test case for entities --- test/Makefile.am | 3 ++- test/data/entities.plist | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ test/entities.test | 12 ++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 test/data/entities.plist create mode 100755 test/entities.test 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 @@ + + + some test entitites + + copyright + © + multiple entitites + ⼠⼡⼢ + multiple entitites with characters inbetween + a⼣b⼤c⼥d + + one byte entity + + one byte entity + @ + one byte entity with text after + @z + one byte entity with text before + a@ + one byte entity with text before & after + a@z + + two-byte utf-8 + + two-byte utf-8 + Ä + two-byte utf-8 with text after + Ëyz + two-byte utf-8 with text before + abÖ + two-byte utf-8 with text before & after + abÜyz + + three byte utf-8 + + three byte utf-8 + + three byte utf-8 with text after + £xyz + three byte utf-8 with text before + abc¥ + three byte utf-8 with text before & after + abc₩xyz + + four byte utf-8 + + four byte utf-8 + 𝕢 + four byte utf-8 with text after + 𝕣wxyz + four byte utf-8 with text before + abcd𝕤 + four byte utf-8 with text before & after + abcd𝕥wxyz + + + 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 -- cgit v1.1-32-gdbae