X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/4081782832b7dc8b7426cedcec9a4495229dda6c..HEAD:/snippet/test-tap.at diff --git a/snippet/test-tap.at b/snippet/test-tap.at index 2873cf4..9167bc5 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,9 +17,11 @@ 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 - - "$builddir/t/$program" "$@" >"$program.tap" + program=$[1] + AS_CASE([$program], + [*/*], [program=`expr "$program" : '[.*/\([^.]*\)]'`], + [*.*], [program=`expr "$program" : '[\([^.]*\)]'`]) + "$[@]" >"$program.tap" status=$? cat "$program.tap" # Older versions of prove do not support the -e option so the