X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/blobdiff_plain/bbfdea24b2b940031e86e990bc457785dd378b58..HEAD:/testsuite.at?ds=sidebyside diff --git a/testsuite.at b/testsuite.at index 1e67965..f47ad86 100644 --- a/testsuite.at +++ b/testsuite.at @@ -1,4 +1,4 @@ -AT_COPYRIGHT([Copyright © 2020 Nick Bowler]) +AT_COPYRIGHT([Copyright (C) 2020-2021, 2023-2024 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 @@ -13,32 +13,47 @@ AT_COPYRIGHT([Copyright © 2020 Nick Bowler]) # You should have received a copy of the GNU General Public License # along with this program. If not, see . +m4_include([common/snippet/at-compat.at]) +m4_include([common/snippet/test-tap.at]) + AT_INIT AT_COLOR_TESTS -AT_TESTED([cdecl99]) +m4_divert_push([PREPARE_TESTS])dnl +{ + echo "% cdecl99 --version" + cdecl99 --version &AS_MESSAGE_LOG_FD 2>&1 +m4_divert_pop([PREPARE_TESTS]) AT_ARG_OPTION_ARG([random-seed], [AS_HELP_STRING([--random-seed=ARG], [Integer seed for randomized testing (default: auto)])], - [random_seed=$at_optarg], [random_seed=$RANDOM$$]) + [random_seed=$at_optarg], + [random_seed=`echo $RANDOM$$ | sed 's/\(........\).*/\1/'`])#' AT_ARG_OPTION_ARG([random-iterations], [AS_HELP_STRING([--random-iterations=N], [Number of randomized testcases to perform (default: 500)])], [random_iter=$at_optarg], [random_iter=]) +m4_define([RE_LOWER], [abcdefghijklmnopqrstuvwxyz]) +m4_define([RE_UPPER], m4_toupper(m4_defn([RE_LOWER]))) +m4_define([RE_ALPHA], m4_defn([RE_UPPER])m4_defn([RE_LOWER])) +m4_define([RE_ALNUM], m4_defn([RE_ALPHA])[0-9]) + m4_divert_push([PREPARE_TESTS])dnl : ${LIBTOOL="$SHELL $builddir/libtool"} -random_seed=`printf '%s' "$random_seed" | tr -cd '@<:@:digit:@:>@'` +random_seed=`printf '%s' "$random_seed" | tr -cd '0123456789'` random_seed=${random_seed:-0} -random_iter=`printf '%s' "$random_iter" | tr -cd '@<:@:digit:@:>@'` +random_iter=`printf '%s' "$random_iter" | tr -cd '0123456789'` random_iter=`expr "$random_iter" '|' 500` 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])])