]> pd.if.org Git - zpackage/commitdiff
fix bug in tap exit with, add diag
authorNathan Wagner <nw@hydaspes.if.org>
Sun, 5 Mar 2017 15:01:04 +0000 (09:01 -0600)
committerNathan Wagner <nw@hydaspes.if.org>
Sun, 5 Mar 2017 15:05:15 +0000 (09:05 -0600)
t/tap.sh

index 59df961a207547397e0719816096d61fe67f6de8..b82f203f5f7628cbdaca6d46d46974a2431ba826 100755 (executable)
--- a/t/tap.sh
+++ b/t/tap.sh
@@ -35,6 +35,10 @@ shownote() {
        fi
 }
 
+diag() {
+       printf '# %s\n' "$@"
+}
+
 okexit() {
        exitwith 0 "$*"
 }
@@ -56,7 +60,7 @@ exitwith() {
        note=
        if [ $rv -ne $1 ]; then
                printf 'not ';
-               note=$(printf '# got "%d" expected "%d"' "$1" "$2")
+               note=$(printf '# got "%d" expected "%d"' "$rv" "$1")
        fi
        shift
        tn=$((tn + 1))