diff options
| author | 2022-01-25 01:47:59 +0100 | |
|---|---|---|
| committer | 2022-01-25 01:47:59 +0100 | |
| commit | 17da5ba554426d732fc850e7211bae7d3a7c016e (patch) | |
| tree | b938249a788fee95839693a37315ec03e62a2b67 /test/json3.test | |
| parent | cef7ab796bbaca1609455aa93e73e64864d04a00 (diff) | |
| download | libplist-17da5ba554426d732fc850e7211bae7d3a7c016e.tar.gz libplist-17da5ba554426d732fc850e7211bae7d3a7c016e.tar.bz2 | |
test: Add additional JSON test case
Diffstat (limited to 'test/json3.test')
| -rwxr-xr-x | test/json3.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/json3.test b/test/json3.test new file mode 100755 index 0000000..06a7007 --- /dev/null +++ b/test/json3.test | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | ## -*- sh -*- | ||
| 2 | |||
| 3 | set -e | ||
| 4 | |||
| 5 | DATASRC=$top_srcdir/test/data | ||
| 6 | DATAOUT=$top_builddir/test/data | ||
| 7 | TESTFILE=entities.plist | ||
| 8 | |||
| 9 | if ! test -d "$DATAOUT"; then | ||
| 10 | mkdir -p $DATAOUT | ||
| 11 | fi | ||
| 12 | |||
| 13 | export PLIST_JSON_DEBUG=1 | ||
| 14 | |||
| 15 | echo "Converting input file to JSON" | ||
| 16 | $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE -o $DATASRC/$TESTFILE.json | ||
| 17 | |||
| 18 | echo "Converting to binary and back to JSON" | ||
| 19 | $top_builddir/test/plist_jtest $DATASRC/$TESTFILE.json $DATAOUT/$TESTFILE.json.out | ||
| 20 | |||
| 21 | echo "Comparing" | ||
| 22 | $top_builddir/test/plist_cmp $DATASRC/$TESTFILE $DATAOUT/$TESTFILE.json.out | ||
