summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-12-23 14:16:02 +0100
committerGravatar Nikias Bassen2021-12-23 14:16:02 +0100
commit24dcee30c5b74f32c90491f0c083a1c212cfe3a1 (patch)
tree30cc39f1d072ca6aa52ff4db085a65b0c041a114
parent0a5f1cc10b62c1d059b2f4e60f5512ac3e15ff07 (diff)
downloadlibplist-24dcee30c5b74f32c90491f0c083a1c212cfe3a1.tar.gz
libplist-24dcee30c5b74f32c90491f0c083a1c212cfe3a1.tar.bz2
test: Update json test case to not rely on --enable-debug
-rwxr-xr-xtest/json-invalid-types.test15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/json-invalid-types.test b/test/json-invalid-types.test
index 0397c05..c532316 100755
--- a/test/json-invalid-types.test
+++ b/test/json-invalid-types.test
@@ -13,23 +13,20 @@ fi
export PLIST_JSON_DEBUG=1
echo "Converting (failure expected)"
-STDERR=`$top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE0 -o /dev/null 2>&1`
-echo "$STDERR"
-if ! echo "$STDERR" |grep "PLIST_DATA type is not valid for JSON format"; then
+$top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE0 -o /dev/null
+if [ $? -neq 2 ]; then
exit 1
fi
echo "Converting (failure expected)"
-STDERR=`$top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE1 -o /dev/null 2>&1`
-echo "$STDERR"
-if ! echo "$STDERR" |grep "PLIST_DATE type is not valid for JSON format"; then
+$top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE1 -o /dev/null
+if [ $? -neq 2 ]; then
exit 2
fi
echo "Converting (failure expected)"
-STDERR=`$top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE2 -o /dev/null 2>&1`
-echo "$STDERR"
-if ! echo "$STDERR" |grep "PLIST_UID type is not valid for JSON format"; then
+$top_builddir/tools/plistutil -f json -i $DATASRC/$TESTFILE2 -o /dev/null
+if [ $? -neq 2 ]; then
exit 3
fi