+2000-02-17 Akim Demaille <akim@epita.fr>
+
+ Fix the `missing dummy.in' reported by the test suite.
+ Reported by Erez Zadok.
+
+ * tests/torture.m4 (config.status under extreme conditions):
+ Reorganized. Because files required by this test were created
+ outside the pair AT_SETUP/AT_CLEANUP, when the test fails and
+ autotest extracts this test, the `debug' script does not contain
+ the files it needs. Now AT_SETUP/AT_CLEANUP encloses the full
+ auto contained section.
+
2000-02-16 Akim Demaille <akim@epita.fr>
* tests/actest.m4 (AC_ENV_SAVE): X_EXTRA_LIBS can be changed by
dnl produce the 100 commands by hand. Be very careful if you want to
dnl touch something.
+
+
+## ------------------------- ##
+## Torturing config.status. ##
+## ------------------------- ##
+
## Require 100 AC_DEFINE and AC_SUBST with a significantly big value.
## This is mostly to check that Autoconf produces portable sed scripts
## in config.status. sed is used to skip the first two lines
## `Generated by...'.
+AT_SETUP(config.status under extreme conditions)
+
AT_DATA(dummy.in,
[m4_for(AT_Count, 1, 100,
[@AT_DUMMY_VAR(AT_Count)@
])])
-AT_TEST_MACRO(config.status under extreme conditions,
-[AC_CONFIG_FILES(dummy)
+AT_DATA(configure.in,
+[AC_INCLUDE(actest.m4)
+AC_INIT
+AC_CONFIG_HEADERS(config.h:config.hin)
+AC_CONFIG_FILES(dummy)
[define]([AC_DEFUBST_VALUE], Big_Value)
dnl The following 4 lines are a transfert from AT_DUMMY_VAR in Autotest
dnl to AC_DUMMY_VAR in Autoconf.
changequote([, ]))
m4_for(AT_Count, 1, 100,
[AC_DEFUBST(AT_Count)
-])],
-[# Checking that AC_DEFINE worked properly.
+])
+AC_OUTPUT
+])
+
+AT_CHECK([../autoconf -m .. -l $at_srcdir], 0,, ignore)
+AT_CHECK([../autoheader -m .. -l $at_srcdir], 0,, ignore)
+AT_CHECK([./configure], 0, ignore)
+
+# Checking that AC_DEFINE worked properly.
AT_DATA(expout,
[m4_for(AT_Count, 1, 100,
[
[#define] AT_DUMMY_VAR(AT_Count) "Big_Value"
])])
AT_CHECK([sed -n -e '3,$ p' config.h], 0, expout)
+
# Checking that AC_SUBST worked properly.
AT_DATA(expout,
[m4_for(AT_Count, 1, 100,
[Big_Value
])])
-])
-dnl Remove test files.
-rm -f dummy dummy.in
+AT_CLEANUP(dummy)
-dnl ## ------------------------------------------------------ ##
-dnl ## Check that `configure' and `config.status' honor their ##
-dnl ## interface. ##
-dnl ## ------------------------------------------------------ ##
+## ------------------------------------------------------ ##
+## Check that `configure' and `config.status' honor their ##
+## interface. ##
+## ------------------------------------------------------ ##
-dnl We run `./configure result=val' and verify that (i) `configure'
-dnl correctly receives `val' and (ii) correctly passes it to
-dnl `config.status', which we check by running `config.status
-dnl --recheck' (which *must* preserve the value of `result').
+# We run `./configure result=val' and verify that (i) `configure'
+# correctly receives `val' and (ii) correctly passes it to
+# `config.status', which we check by running `config.status --recheck'
+# (which *must* preserve the value of `result').
AT_SETUP(command line interface)