]> git.draconx.ca Git - dxcommon.git/blob - testsuite.at
help_print_optstring: Test fullwidth/halfwidth character output.
[dxcommon.git] / testsuite.at
1 AT_COPYRIGHT([dnl
2 Copyright © 2015, 2019-2023 Nick Bowler
3 License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 This is free software: you are free to do what the fuck you want to.
5 There is NO WARRANTY, to the extent permitted by law.])
6
7 AT_INIT
8 AT_COLOR_TESTS
9
10 m4_include([snippet/test-tap.at])
11 m4_include([snippet/test-nls.at])
12
13 m4_divert_push([PREPARE_TESTS])dnl
14 # Reduce influence from the toplevel "make" invocation on test cases.
15 AS_UNSET([MAKEFLAGS])
16 AS_UNSET([MAKELEVEL])
17 AS_UNSET([MFLAGS])
18 m4_divert_pop([PREPARE_TESTS])
19
20 m4_define([TEST_CONFIGURE_AC], [AT_KEYWORDS([autoconf m4])dnl
21 AT_DATA([configure.ac],
22 [[AC_INIT([test], [0])
23
24 # Install t/bork into the path, which contains a non-functional
25 # dummy "awk" command to catch direct "awk" usage (as opposed to
26 # using AC_PROG_AWK and $AWK).  Then work around direct awk usage
27 # in LT_INIT to avoid the dummy.
28 test_orig_PATH=$PATH
29 PATH=$at_srcdir/t/bork:$PATH
30 m4@&t@_ifdef([LT_INIT], [m4@&t@_define([LT_INIT],
31 [m4@&t@_pushdef([awk], [$AWK])]m4@&t@_defn([LT_INIT])[m4@&t@_popdef([awk])])])
32
33 ]$1[
34 AC_OUTPUT
35 ]])
36 cp "$srcdir/install-sh" \
37    "$srcdir/depcomp" \
38    "$srcdir/missing" \
39    "$srcdir/compile" \
40    "$srcdir/config.sub" \
41    .
42 # Simplified config.guess script avoids some spurious testcase failures
43 # when using heirloom-sh on GNU/Linux.
44 config_guess=`"$srcdir/config.guess"`
45 cat >config.guess <<EOF
46 #!/bin/sh
47 cat <<'GUESS_EOF'
48 $config_guess
49 GUESS_EOF
50 EOF
51 chmod +x config.guess
52 ])
53 m4_define([TEST_AUTORECONF], [AT_KEYWORDS([autoconf])dnl
54 AT_CHECK([autoreconf -I "$srcdir/m4"], [0], [], [stderr])])
55
56 m4_define([TEST_CONFIGURE], [AT_KEYWORDS([configure])dnl
57 AT_CHECK([export CC
58 CONFIG_SHELL=$TEST_SHELL $TEST_SHELL m4_default([$2],
59 [./configure]) --quiet CONFIG_SHELL="$TEST_SHELL" \
60   at_srcdir="$srcdir" AWK="$AWK" $1])])
61
62 m4_include([tests/macros.at])
63 m4_include([tests/snippets.at])
64 m4_include([tests/functions.at])
65 m4_include([tests/programs.at])
66 m4_include([tests/libs.at])
67 m4_include([tests/scripts.at])