summaryrefslogtreecommitdiff
path: root/tests/tools.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tools.at')
-rw-r--r--tests/tools.at28
1 files changed, 23 insertions, 5 deletions
diff --git a/tests/tools.at b/tests/tools.at
index 314462ff..3093225c 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -390,6 +390,7 @@ AT_DATA([configure.ac],
[[AC_INIT
AC_CONFIG_MACRO_DIR([dir1])
AC_CONFIG_MACRO_DIR([dir2])
+AC_OUTPUT
]])
AT_CHECK_AUTOCONF([], [1], [], [stderr])
AT_CHECK([grep 'error: AC_CONFIG_MACRO_DIR can only be used once' stderr],
@@ -421,6 +422,7 @@ AT_DATA([configure.ac],
[[AC_INIT
AC_CONFIG_MACRO_DIRS([dir1])
AC_CONFIG_MACRO_DIRS([dir2])
+AC_OUTPUT
]])
AT_CHECK_AUTOCONF([], [0], [], [])
AT_CHECK_AUTOCONF([-t AC_CONFIG_MACRO_DIR], [0],
@@ -459,7 +461,9 @@ end-language: "Autoconf-without-aclocal-m4"
]])
AT_CHECK_AUTOCONF([], 1, [],
-[[configure.ac:2: error: possibly undefined macro: m4@&t@_foo
+[[trailer.m4: warning: AC_INIT was never used
+trailer.m4: warning: AC_OUTPUT was never used
+configure.ac:2: error: possibly undefined macro: m4@&t@_foo
If this token and others are legitimate, please use m4@&t@_pattern_allow.
See the Autoconf documentation.
configure.ac:3: error: possibly undefined macro: _m4@&t@_bar
@@ -467,8 +471,12 @@ configure.ac:4: error: possibly undefined macro: AS@&t@_FOO
configure.ac:5: error: possibly undefined macro: _AS@&t@_BAR
configure.ac:6: error: possibly undefined macro: d@&t@nl
]])
-# Second run should succeed and yield no output.
-AT_CHECK([autoconf])
+# A second run (without --force) should succeed and yield only the
+# warnings about AC_INIT and AC_OUTPUT.
+AT_CHECK_M4([autoconf], 0, [],
+[[trailer.m4: warning: AC_INIT was never used
+trailer.m4: warning: AC_OUTPUT was never used
+]])
AT_CLEANUP
@@ -500,7 +508,9 @@ It would be very bad if Autoconf forgot to expand [AS_]INIT!
]])
AT_CHECK_AUTOCONF([], 1, [],
-[[configure.ac:1: error: possibly undefined macro: AS@&t@_INIT
+[[trailer.m4: warning: AC_INIT was never used
+trailer.m4: warning: AC_OUTPUT was never used
+configure.ac:1: error: possibly undefined macro: AS@&t@_INIT
If this token and others are legitimate, please use m4@&t@_pattern_allow.
See the Autoconf documentation.
configure.ac:7: error: possibly undefined macro: AS@&t@_ALLOWED_NOT
@@ -539,7 +549,10 @@ m4_divert([])dnl
line that begins with a space
]])
-AT_CHECK_AUTOCONF
+AT_CHECK_AUTOCONF([], 0, [],
+[[trailer.m4: warning: AC_INIT was never used
+trailer.m4: warning: AC_OUTPUT was never used
+]])
AT_CLEANUP
@@ -1009,6 +1022,7 @@ AT_DATA([configure.ac],
[[AC_INIT
OLD(1, 2)
NEW([0, 0], [0])
+AC_OUTPUT
]])
# Checking `autoupdate'.
@@ -1053,6 +1067,7 @@ AT_SETUP([autoupdating AC_HELP_STRING])
AT_DATA([configure.ac],
[[AC_INIT
AC_ARG_ENABLE([foo], [AC_HELP_STRING([--enable-foo], [foo bar])], [:], [:])
+AC_OUTPUT
]])
# Checking `autoupdate'.
@@ -1189,6 +1204,7 @@ AC_LANG_SAVE
AC_LANG_RESTORE
AC_LANG_SAVE
AC_LANG_RESTORE
+AC_OUTPUT
]])
# Checking `autoupdate'.
@@ -1210,6 +1226,7 @@ AT_DATA([aclocal.m4],
AT_DATA([configure.ac],
[[AC_INIT
echo AC_FOREACH([myvar], [1 2 3], [' myvar'])OLD
+AC_OUTPUT
]])
# Checking `autoupdate'.
@@ -1318,6 +1335,7 @@ chmod a-w sub
AT_DATA([configure.ac],
[[AC_INIT
+AC_OUTPUT
]])
AT_DATA([.autom4te.cfg],