summaryrefslogtreecommitdiffstats
path: root/test/json3.test
blob: 6189e89e3f6e007ae1dfc525ee22a6fd40b6dccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## -*- sh -*-

set -e

DATASRC=$top_srcdir/test/data
DATAOUT=$top_builddir/test/data
TESTFILE=entities.plist

if ! test -d "$DATAOUT"; then
	mkdir -p $DATAOUT
fi

export PLIST_JSON_DEBUG=1

echo "Converting input file to JSON"
$top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE -o $DATAOUT/json3.test.json

echo "Converting to binary and back to JSON"
$top_builddir/test/plist_jtest $DATAOUT/json3.test.json $DATAOUT/json3.test.json.out

echo "Comparing"
$top_builddir/test/plist_cmp $DATASRC/$TESTFILE $DATAOUT/json3.test.json.out

rm -f $DATAOUT/json3.test.json