]> git.draconx.ca Git - cdecl99.git/blobdiff - testsuite.at
libcdecl: Fix scanning of hexadecimal constants.
[cdecl99.git] / testsuite.at
index 861d2c68c2bf23556ca7788e32c63761dbbb9153..58fae65eaa4691b8d0992f93eb4b476fc48b97ab 100644 (file)
@@ -13,10 +13,19 @@ 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
 
-AT_TESTED([cdecl99])
+m4_divert_push([PREPARE_TESTS])dnl
+{
+  echo "% cdecl99 --version"
+  cdecl99 --version </dev/null
+  echo
+} >&AS_MESSAGE_LOG_FD 2>&1
+m4_divert_pop([PREPARE_TESTS])
 
 AT_ARG_OPTION_ARG([random-seed],
   [AS_HELP_STRING([--random-seed=ARG],
@@ -43,7 +52,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])])