test: Update json test case to not rely on --enable-debug
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 @@
 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