]> git.draconx.ca Git - rrace.git/blobdiff - testsuite.at
Fix some missing #includes.
[rrace.git] / testsuite.at
index f76b15a834d71a17aa317c28a7e3b5a5fc312ffd..c00be4810a0150ce8fdaaa500e8ff8c50f6fa99c 100644 (file)
@@ -1,4 +1,4 @@
-AT_COPYRIGHT([Copyright © 2022 Nick Bowler])
+AT_COPYRIGHT([Copyright © 2022-2023 Nick Bowler])
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,16 +18,18 @@ AT_COLOR_TESTS
 
 m4_divert_push([PREPARE_TESTS])dnl
 test_run_tap () {
-  "$builddir/t/$1" > "$1.tap"
+  program=$1; shift
+
+  "$builddir/t/$program" "$@" > "$program.tap"
   status=$?
-  cat "$1.tap"
-  :; { echo 'print <<EOF'; cat "$1.tap"; echo 'EOF'; } >"$1.pl"
-  prove "$1.pl" 2>&1
+  cat "$program.tap"
+  :; { echo 'print <<EOF'; cat "$program.tap"; echo 'EOF'; } >"$program.pl"
+  prove "$program.pl" 2>&1
   return $status
 }
 m4_divert_pop([PREPARE_TESTS])
 
-m4_define([TEST_TAP], [AT_CHECK([test_run_tap "$1"], [0], [ignore])])
+m4_define([TEST_TAP], [AT_CHECK([test_run_tap $1], [0], [ignore])])
 m4_define([TEST_TAP_SIMPLE], [dnl
 AT_SETUP([$1])
 AT_KEYWORDS([$4])dnl