From cf78d2aad652d3dd53a76e6651a08194a52afb6e Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Sat, 6 Jan 2024 15:49:53 -0500 Subject: [PATCH] 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. --- snippet/test-tap.at | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" -- 2.43.2