X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=t%2Ftap.sh;fp=t%2Ftap.sh;h=553128ffe01e9a55e5e58570acc07699f1dab1ea;hb=7b53df56cc94695572fa6ea8b075cf7e89b3690c;hp=23c52997190d8f127cab8a8384f828d92bcf50f2;hpb=a6ae868d213345dc2e599abf547a598a0626199a;p=zpackage diff --git a/t/tap.sh b/t/tap.sh index 23c5299..553128f 100755 --- a/t/tap.sh +++ b/t/tap.sh @@ -26,10 +26,11 @@ okexit() { } failsok() { + rv=$? note= - if [ $? -eq 0 ]; then + if [ $rv -eq 0 ]; then printf 'not '; - note=$(printf '# got "%d" expected "%d"' "$1" "0") + note=$(printf 'got "%d" expected "%d"' "$rv" "0") fi tn=$((tn + 1)) printf 'ok %d - %s\n' $tn "$*" @@ -37,8 +38,9 @@ failsok() { } exitwith() { + rv=$? note= - if [ $? -ne $1 ]; then + if [ $rv -ne $1 ]; then printf 'not '; note=$(printf '# got "%d" expected "%d"' "$1" "$2") fi