aboutsummaryrefslogtreecommitdiff
path: root/scripts/runtest.sh
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2022-07-23 11:32:16 -0500
committerRob Landley <rob@landley.net>2022-07-23 11:32:16 -0500
commit5bbef42111b4577d857d556dc00700211f5cc65a (patch)
tree71a11cb87b149a10f22ded16d2431498c0156184 /scripts/runtest.sh
parenta41bbf8eec0c09470c2d5aa78f451d02b8ea99c3 (diff)
downloadtoybox-5bbef42111b4577d857d556dc00700211f5cc65a.tar.gz
Second attempt to show the diff after the FAIL line instead of before.
Diffstat (limited to 'scripts/runtest.sh')
-rw-r--r--scripts/runtest.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/scripts/runtest.sh b/scripts/runtest.sh
index 1ca5c579..8b7df985 100644
--- a/scripts/runtest.sh
+++ b/scripts/runtest.sh
@@ -111,7 +111,7 @@ wrong_args()
# Announce success
do_pass()
{
- ! verbose_has nopass && printf "%s\n" "$SHOWPASS: $NAME"
+ verbose_has nopass || printf "%s\n" "$SHOWPASS: $NAME"
}
# Announce failure and handle fallout for txpect
@@ -154,10 +154,7 @@ testing()
[ $RETVAL -gt 128 ] &&
echo "exited with signal (or returned $RETVAL)" >> actual
DIFF="$(diff -au${NOSPACE:+w} expected actual)"
- if [ -n "$DIFF" ]
- then do_fail
- else do_pass
- fi
+ [ -z "$DIFF" ] && do_pass || VERBOSE=all do_fail
if ! verbose_has quiet && { [ -n "$DIFF" ] || verbose_has spam; }
then
[ ! -z "$4" ] && printf "%s\n" "echo -ne \"$4\" > input"