From: Nathan Wagner Date: Thu, 7 Mar 2019 19:59:59 +0000 (+0000) Subject: fix failsok tap function X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=1cae772831e604785c37f347bd6b0618f59e0f69;hp=feb59bb467093009aa3f736cf7e6aa137fbad68a fix failsok tap function --- 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 "$*"