Four new autoupdate tests, expected failures.

* tests/tools.at (autoupdating macros recursively)
(autoupdating with m4@&t@_pushdef, autoupdating with AC_REQUIRE)
(autoupdating with complex quoting): New tests.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
Ralf Wildenhues 2009-09-13 10:03:51 +02:00
parent 105fd64d1c
commit 52531c3002
2 changed files with 109 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2009-09-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Four new autoupdate tests, expected failures.
* tests/tools.at (autoupdating macros recursively)
(autoupdating with m4@&t@_pushdef, autoupdating with AC_REQUIRE)
(autoupdating with complex quoting): New tests.
Fix description of AC_CHECK_LIB regarding other deplibs.
* doc/autoconf.texi (Libraries): Library linking may not fail
even without missing additional libs.

View File

@ -890,6 +890,31 @@ AT_CHECK([[grep 'NEW(\[0, 0], *\[0])' configure.ac]], 0, [ignore], [ignore])
AT_CLEANUP
# autoupdating macros recursively
# -------------------------------
AT_SETUP([autoupdating macros recursively])
AT_XFAIL_IF([:])
AT_DATA([configure.ac],
[[AC_INIT
AC_PROG_CC
AC_TRY_COMPILE([], [choke me], [echo bogus1],
[AC_TRY_COMPILE([], [return 0;], [echo good], [echo bogus2])])
AC_OUTPUT
]])
# Checking `autoupdate'.
AT_CHECK_AUTOUPDATE
AT_CHECK([grep changequote configure.ac], [1])
AT_CHECK([grep TRY_COMPILE configure.ac], [1])
AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE
AT_CLEANUP
# autoupdating AC_HELP_STRING
# ---------------------------
AT_SETUP([autoupdating AC_HELP_STRING])
@ -944,6 +969,85 @@ AT_CHECK_CONFIGURE([], [], [], [ignore])
AT_CLEANUP
# autoupdating with m4_pushdef
# ----------------------------
AT_SETUP([autoupdating with m4@&t@_pushdef])
AT_XFAIL_IF([:])
touch foo.in
AT_DATA([configure.ac],
[[AC_INIT
AC_PROG_CC
# temporarily override this macro
m4@&t@_pushdef([AC_MSG_RESULT_UNQUOTED], [:])
AC_C_BIGENDIAN
m4@&t@_popdef([AC_MSG_RESULT_UNQUOTED])
AC_OUTPUT
]])
# Checking `autoupdate'.
AT_CHECK_AUTOUPDATE([], [], [], [ignore])
AT_CHECK([grep changequote configure.ac], [1])
AT_CHECK([grep [pushdef.*AC_MSG_RESULT_UNQUOTED] configure.ac], [0], [ignore])
AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE([], [], [], [ignore])
AT_CLEANUP
# autoupdating with AC_REQUIRE
# ----------------------------
AT_SETUP([autoupdating with AC_REQUIRE])
AT_XFAIL_IF([:])
AT_DATA([configure.ac],
[[AC_DEFUN([MACRO],
[AC_REQUIRE([AC_DECL_SYS_SIGLIST])
AC_CHECK_DECLS([_sys_siglist], [], [], [#include <signal.h>])
])
AC_INIT
MACRO
AC_OUTPUT
]])
# Checking `autoupdate'.
AT_CHECK_AUTOUPDATE([], [], [], [ignore])
AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE([], [], [], [ignore])
AT_CLEANUP
# autoupdating with complex quoting
# ---------------------------------
AT_SETUP([autoupdating with complex quoting])
AT_XFAIL_IF([:])
AT_DATA([configure.ac],
[[m4_define([MACRO],
[[#define STRING "hello, world\n"
]])
AC_INIT
AC_TRY_COMPILE([#include <stdio.h>
]MACRO[], [printf (STRING);],
[], [AS_EXIT([1])])
AC_OUTPUT
]])
# Checking `autoupdate'.
AT_CHECK_AUTOUPDATE([], [], [], [ignore])
AT_CHECK_AUTOCONF
AT_CHECK([grep MACRO configure], [1])
AT_CHECK_CONFIGURE([], [], [], [ignore])
AT_CLEANUP
# autoupdating AC_LANG_SAVE
# -------------------------
AT_SETUP([autoupdating AC_LANG_SAVE])