From: Nick Bowler Date: Sat, 6 Jan 2024 20:49:53 +0000 (-0500) Subject: test-tap.at: Tweak filename generation. X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/commitdiff_plain/cf78d2aad652d3dd53a76e6651a08194a52afb6e?ds=sidebyside test-tap.at: Tweak filename generation. When generating the output filenames, use only the last component of the test program's filename, up to but not including the first period. This should enable things to work if an absolute or relative path to an executable is specified, and avoids extending filenames unnecessarily. --- diff --git a/snippet/test-tap.at b/snippet/test-tap.at index cf9554f..9167bc5 100644 --- a/snippet/test-tap.at +++ b/snippet/test-tap.at @@ -18,7 +18,9 @@ m4_defun([_TEST_TAP_PREPARE], [m4_divert_push([PREPARE_TESTS])dnl # TAP-formatted output. test_run_tap () { program=$[1] - + AS_CASE([$program], + [*/*], [program=`expr "$program" : '[.*/\([^.]*\)]'`], + [*.*], [program=`expr "$program" : '[\([^.]*\)]'`]) "$[@]" >"$program.tap" status=$? cat "$program.tap"