]> git.draconx.ca Git - cdecl99.git/blobdiff - testsuite.at
tests: Add sanity check for truncated output.
[cdecl99.git] / testsuite.at
index bad16f14a75d51c5346469e1d7ea9ac60bde68a6..9533e66eddb6d4616b7792c9b83bb026f1ca7df4 100644 (file)
@@ -13,11 +13,12 @@ AT_COPYRIGHT([Copyright © 2020-2021, 2023 Nick Bowler])
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+m4_include([common/snippet/at-compat.at])
+m4_include([common/snippet/test-tap.at])
+
 AT_INIT
 AT_COLOR_TESTS
 
-m4_include([common/snippet/test-tap.at])
-
 AT_TESTED([cdecl99])
 
 AT_ARG_OPTION_ARG([random-seed],
@@ -45,7 +46,7 @@ m4_divert_pop([PREPARE_TESTS])
 
 m4_define([TEST_NEED_PROGRAM], [AT_KEYWORDS([$1])dnl
 AT_CHECK([for arg in $check_PROGRAMS; do
-test x"${arg##*/}" != x"$1$EXEEXT" || exit 0
+progexe="$1$EXEEXT"; case $arg in "$progexe"|*/"$progexe") exit 0 ;; esac
 done
 exit 77])])