Hash :
28ed42d9
Author :
Date :
2012-03-14T22:22:40
tests: fix spurious failure with older m4 Reported by Panther Martin in automake bug#10866, diagnosed by Panther Martin and Eric Blake. Older GNU m4 versions (e.g., 1.4.6) did error reporting at the end of an error construct rather than the beginning. This was causing a spurious testsuite failure due to an off-by-one error in the line number reported in an aclocal diagnostic. * tests/cond41.test: Keep all the body of the 'AM_COND_IF' invocation on a single line, to avoid the off-by-one error. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
#!/bin/sh
# Copyright (C) 2008-2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# AM_COND_IF with an undefined condition should fail.
. ./defs || Exit 1
cat >>configure.ac <<'END'
AM_COND_IF([BAD_COND], [AC_CONFIG_FILES([file1])])
AC_OUTPUT
END
$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
grep '^configure\.ac:4:.*AM_COND_IF.* no such condition.*BAD_COND' stderr
: