diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/data/1.plist | 6 | ||||
| -rwxr-xr-x | test/json-invalid-types.test | 6 | ||||
| -rwxr-xr-x | test/ostep-invalid-types.test | 9 |
3 files changed, 10 insertions, 11 deletions
diff --git a/test/data/1.plist b/test/data/1.plist index e6e275d..82a112b 100644 --- a/test/data/1.plist +++ b/test/data/1.plist @@ -23,11 +23,11 @@ <key>Another Boolean</key> <true/> <key>Some Int</key> - <integer></integer> + <integer>0</integer> <key>Some Real</key> - <real></real> + <real>1e4</real> <key>Some Date</key> - <date></date> + <date>1970-01-01T00:00:00Z</date> <key>Some Data</key> <data> </data> diff --git a/test/json-invalid-types.test b/test/json-invalid-types.test index c532316..a21fcd9 100755 --- a/test/json-invalid-types.test +++ b/test/json-invalid-types.test @@ -14,19 +14,19 @@ export PLIST_JSON_DEBUG=1 echo "Converting (failure expected)" $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE0 -o /dev/null -if [ $? -neq 2 ]; then +if [ $? -ne 2 ]; then exit 1 fi echo "Converting (failure expected)" $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE1 -o /dev/null -if [ $? -neq 2 ]; then +if [ $? -ne 2 ]; then exit 2 fi echo "Converting (failure expected)" $top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE2 -o /dev/null -if [ $? -neq 2 ]; then +if [ $? -ne 2 ]; then exit 3 fi diff --git a/test/ostep-invalid-types.test b/test/ostep-invalid-types.test index 9222394..3ae376c 100755 --- a/test/ostep-invalid-types.test +++ b/test/ostep-invalid-types.test @@ -2,7 +2,6 @@ DATASRC=$top_srcdir/test/data DATAOUT=$top_builddir/test/data -TESTFILE0=data.bplist TESTFILE1=7.plist TESTFILE2=uid.bplist @@ -13,20 +12,20 @@ fi export PLIST_OSTEP_DEBUG=1 echo "Converting (failure expected)" -$top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE0 -o /dev/null -if [ $? -neq 2 ]; then +echo '[true]' |$top_builddir/tools/plistutil -f openstep -i - -o /dev/null +if [ $? -ne 2 ]; then exit 1 fi echo "Converting (failure expected)" $top_builddir/tools/plistutil -f openstepn -i $DATASRC/$TESTFILE1 -o /dev/null -if [ $? -neq 2 ]; then +if [ $? -ne 2 ]; then exit 2 fi echo "Converting (failure expected)" $top_builddir/tools/plistutil -f openstep -i $DATASRC/$TESTFILE2 -o /dev/null -if [ $? -neq 2 ]; then +if [ $? -ne 2 ]; then exit 3 fi |
