From 9d52e76ca7992bf2f38868dbcf9c84a7cc1484c9 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Sun, 21 Oct 2018 00:00:11 +0000 Subject: [PATCH] have tap.sh require use tryrun --- t/tap.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/t/tap.sh b/t/tap.sh index 162a4eb..f881b1c 100755 --- a/t/tap.sh +++ b/t/tap.sh @@ -4,7 +4,6 @@ tn=0 planned=0 tryrun() { - note="$@" program=$1 shift $program "$@" > test.out 2>&1 @@ -16,25 +15,17 @@ tryrun() { printf 'ok %d - %s %s\n' $tn $program "$*" if [ $tap_return_value -ne 0 ]; then cat test.out | diagstdin + rm test.out fi return $tap_return_value } require() { - note="$*" - program=$1 - shift - $program "$@" > test.out 2>&1 + tryrun "$@" rv=$? - tn=$((tn + 1)) if [ $rv -ne 0 ]; then - printf 'not ok %d - %s %s\n' $tn $program "$*" - cat test.out | diagstdin - rm test.out bailout "exit status $rv"; fi - printf 'ok %d - %s %s\n' $tn $program "$*" - } bailout() { -- 2.40.0