]> pd.if.org Git - zpackage/commitdiff
fix failsok tap function
authorNathan Wagner <nw@hydaspes.if.org>
Thu, 7 Mar 2019 19:59:59 +0000 (19:59 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Thu, 7 Mar 2019 19:59:59 +0000 (19:59 +0000)
t/scripts.t
t/tap.sh

index 0f544457f6ca23e85690b60ccf84a06ec941d033..4e24259a579d627251b58d23530a3ed5a25ab9db 100755 (executable)
@@ -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
index c9fe8788b52694a69da2768638c4537c4018a1c5..8f9eabe6cf3b3bf825d218af41f4bac3e399e052 100755 (executable)
--- 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 "$*"