X-Git-Url: http://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/77f6e4eadbfbddd069ebc259921f4587856d488a..5255b0884bd50f2e96d2cbd5951cb4ef98eece5d:/snippet/test-tap.at diff --git a/snippet/test-tap.at b/snippet/test-tap.at index cccea49..cf9554f 100644 --- a/snippet/test-tap.at +++ b/snippet/test-tap.at @@ -1,4 +1,4 @@ -# Copyright © 2015, 2022-2023 Nick Bowler +# Copyright © 2015, 2022-2024 Nick Bowler # # Helper macros for executing the TAP-like applications in an autotest # test suite. @@ -17,15 +17,15 @@ m4_defun([_TEST_TAP_PREPARE], [m4_divert_push([PREPARE_TESTS])dnl # Run a test program, and, if prove is installed, use it to interpret the # TAP-formatted output. test_run_tap () { - program=$[1]; shift + program=$[1] - "$builddir/t/$program" "$@" >"$program.tap" + "$[@]" >"$program.tap" status=$? cat "$program.tap" # Older versions of prove do not support the -e option so the # "test" must be a perl script. :; { echo 'print <"$program.pl" - prove "$program.pl" 2>&1 + { prove "$program.pl"; } 2>&1 return $status } m4_divert_pop([PREPARE_TESTS])])