From 1cae772831e604785c37f347bd6b0618f59e0f69 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Thu, 7 Mar 2019 19:59:59 +0000 Subject: [PATCH] fix failsok tap function --- t/scripts.t | 2 +- t/tap.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/scripts.t b/t/scripts.t index 0f54445..4e24259 100755 --- a/t/scripts.t +++ b/t/scripts.t @@ -17,7 +17,7 @@ require zpm init $PF require zpm newpackage -f $PF $pkgid tryrun -v zpm script -f $PF -s -p configure scriptrunner-1.0-1 /bin/false -zpm script -f $PF -p configure -r scriptrunner-1.0-1 2>/dev/null +zpm script -f $PF -p configure -r scriptrunner-1.0-1 2>&1 failsok failure script fails zpm script -f $PF -p nosuchphase -r -F scriptrunner-1.0-1 2>/dev/null diff --git a/t/tap.sh b/t/tap.sh index c9fe878..8f9eabe 100755 --- a/t/tap.sh +++ b/t/tap.sh @@ -74,7 +74,7 @@ failsok() { note= if [ $rv -eq 0 ]; then printf 'not '; - note=$(printf 'got "%d" expected "%d"' "$rv" "0") + note=$(printf 'got "%d" expected non-zero' "$rv") fi tn=$((tn + 1)) printf 'ok %d - %s\n' $tn "$*" -- 2.40.0