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.
# TAP-formatted output.
test_run_tap () {
program=$[1]
-
+ AS_CASE([$program],
+ [*/*], [program=`expr "$program" : '[.*/\([^.]*\)]'`],
+ [*.*], [program=`expr "$program" : '[\([^.]*\)]'`])
"$[@]" >"$program.tap"
status=$?
cat "$program.tap"