diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2004-05-17 20:19:35 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2004-05-17 20:19:35 +0000 |
commit | 5094cfc0d90d9df18a5fed2abe0ec139b98be19b (patch) | |
tree | d54cb88178f10c864e95f0b56d1773ecebc741fc /tests | |
parent | 150c156c7794476cb5d529208f069884b218976b (diff) | |
download | automake-5094cfc0d90d9df18a5fed2abe0ec139b98be19b.tar.gz |
* m4/cond.m4 (AM_CONDITIONAL): Double-quote diagnostic.
* tests/condd.test: Define a macro with the same name as a
conditional.
* tests/pr220.test: Modernize, and make sure the diagnostics
contains the macro name.
Report from Volker Boerchers.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/condd.test | 8 | ||||
-rwxr-xr-x | tests/pr220.test | 23 |
2 files changed, 17 insertions, 14 deletions
diff --git a/tests/condd.test b/tests/condd.test index a05839efb..67318df3e 100755 --- a/tests/condd.test +++ b/tests/condd.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. # # This file is part of GNU Automake. # @@ -26,7 +26,10 @@ set -e cat >> configure.in << 'END' AC_PROG_CC -AM_CONDITIONAL(COND1, false) +dnl Define a macro with the same name as the conditional to exhibit +dnl any underquotted bug. +AC_DEFUN([COND1], ["some'meaningless;characters`]) +AM_CONDITIONAL([COND1], false) AC_CONFIG_FILES([foo/Makefile]) AC_CONFIG_FILES([bar/Makefile]) AC_OUTPUT @@ -65,6 +68,7 @@ mkdir foo bar $ACLOCAL $AUTOCONF +grep "meaningless;characters" configure && exit 1 $AUTOMAKE ./configure $MAKE test diff --git a/tests/pr220.test b/tests/pr220.test index 3384dd2bd..2933a058a 100755 --- a/tests/pr220.test +++ b/tests/pr220.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. # # This file is part of GNU Automake. # @@ -23,6 +23,8 @@ required=gcc . ./defs || exit 1 +set -e + cat >main.c <<EOF int main() { return 0; } EOF @@ -36,9 +38,7 @@ bin_PROGRAMS = main main_SOURCES = main.c $(NEVER_DEFINED) EOF -cat > configure.in << 'EOF' -AC_INIT(main.c) -AM_INIT_AUTOMAKE(test_am, 1.0) +cat >> configure.in << 'EOF' AC_PROG_CC AC_ARG_ENABLE(foo, [ --enable-foo Enable foo], @@ -48,18 +48,17 @@ AC_ARG_ENABLE(foo, AM_CONDITIONAL(NEVER_TRUE, false) fi ]) -AC_OUTPUT(Makefile) +AC_OUTPUT EOF -touch README NEWS AUTHORS ChangeLog - mkdir build -$ACLOCAL \ - && $AUTOCONF \ - && $AUTOMAKE -a || exit 1 +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a cd build # configure should fail since we've done something invalid. -../configure && exit 1 -exit 0 +../configure 2>stderr && exit 1 +cat stderr +grep NEVER_TRUE stderr |