From 24dcee30c5b74f32c90491f0c083a1c212cfe3a1 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 23 Dec 2021 14:16:02 +0100 Subject: test: Update json test case to not rely on --enable-debug --- test/json-invalid-types.test | 15 ++++++--------- 1 file 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 -- cgit v1.1-32-gdbae