aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-06-30 10:39:23 -0500
committerRob Landley <rob@landley.net>2016-06-30 10:39:23 -0500
commitfcbf55ad565861e22e1cb297e6954b9d82f5094b (patch)
treed07f12ca6a02a55e4136a0cca3f7e7a808f231d1 /scripts
parent480fb07817fa4b096397cf9ee8484e8ee38822dc (diff)
downloadtoybox-fcbf55ad565861e22e1cb297e6954b9d82f5094b.tar.gz
Add NOSPACE=1 to allow tests to pass with diff -b
Diffstat (limited to 'scripts')
-rw-r--r--scripts/runtest.sh6
1 files changed, 3 insertions, 3 deletions
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