From fcbf55ad565861e22e1cb297e6954b9d82f5094b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 30 Jun 2016 10:39:23 -0500 Subject: Add NOSPACE=1 to allow tests to pass with diff -b --- scripts/runtest.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/runtest.sh') diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 875ce572..13b82f14 100644 --- a/scripts/runtest.sh +++ b/scripts/runtest.sh @@ -90,8 +90,8 @@ testing() [ $RETVAL -gt 128 ] && [ $RETVAL -lt 255 ] && echo "exited with signal (or returned $RETVAL)" >> actual - cmp expected actual > /dev/null 2>&1 - if [ $? -ne 0 ] + DIFF="$(diff -au${NOSPACE:+b} expected actual)" + if [ ! -z "$DIFF" ] then FAILCOUNT=$[$FAILCOUNT+1] echo "$SHOWFAIL: $NAME" @@ -99,7 +99,7 @@ testing() then [ ! -z "$4" ] && echo "echo -ne \"$4\" > input" echo "echo -ne '$5' |$EVAL $2" - diff -au expected actual + echo "$DIFF" [ "$VERBOSE" == fail ] && exit 1 fi else -- cgit v1.2.3