From: Stefano Lattarini Date: Mon, 4 Oct 2010 16:17:22 +0000 (+0200) Subject: Fix nits and bugs in tests `help*.test'. X-Git-Tag: v1.11.1b~46^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51e3b6841a474d129fc25077e42dea38ec181cd6;p=thirdparty%2Fautomake.git Fix nits and bugs in tests `help*.test'. * tests/help4.test: Fix broken sed commands used to strip `-W...' flags away from "$AUTOMAKE" and "$ACLOCAL". * tests/help3.test: Likewise, and fix a botched comment. * tests/help.test: Likewise. Also, use "AUTOMAKE_fails ..." instead of "$AUTOMAKE ... && Exit 1", for consistency and to please maintainet-check. * tests/help2.test: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 06a6e47e7..03187aa91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-10-04 Stefano Lattarini + + Fix nits and bugs in tests `help*.test'. + * tests/help4.test: Fix broken sed commands used to strip `-W...' + flags away from "$AUTOMAKE" and "$ACLOCAL". + * tests/help3.test: Likewise, and fix a botched comment. + * tests/help.test: Likewise. Also, use "AUTOMAKE_fails ..." + instead of "$AUTOMAKE ... && Exit 1", for consistency and to + please maintainet-check. + * tests/help2.test: Likewise. + 2010-10-03 Stefano Lattarini Ralf Wildenhues diff --git a/tests/help.test b/tests/help.test index 012e1d797..dd8b3b45f 100755 --- a/tests/help.test +++ b/tests/help.test @@ -14,8 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Make sure --help and --version work, even when no configure.ac -# is in the current directory. +# Make sure --help and --version work, even when no configure.ac nor +# configure.in is in the current directory. . ./defs || Exit 1 @@ -26,8 +26,8 @@ mkdir emptydir cd emptydir # Honour user overrides for $ACLOCAL and $AUTOMAKE. -ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]* / /g'` -AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]* / /g'` +ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'` +AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'` $ACLOCAL --version $ACLOCAL --help @@ -40,8 +40,7 @@ $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 $FGREP configure.ac stderr $FGREP configure.in stderr -$AUTOMAKE 2>stderr && { cat stderr >&2; Exit 1; } -cat stderr >&2 +AUTOMAKE_fails $FGREP configure.ac stderr $FGREP configure.in stderr diff --git a/tests/help2.test b/tests/help2.test index 7a05aca14..5212092a5 100755 --- a/tests/help2.test +++ b/tests/help2.test @@ -25,20 +25,19 @@ mkdir cleandir cd cleandir # Honour user overrides for $ACLOCAL and $AUTOMAKE. -ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]* / /g'` -AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]* / /g'` +ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'` +AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'` echo '[' > configure.in $AUTOMAKE --version $AUTOMAKE --help -# aclocal and automake cannot work without configure.ac or configure.in +# Sanity checks: aclocal and automake cannot work with broken configure.in. $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 $FGREP configure.in stderr -$AUTOMAKE 2>stderr && { cat stderr >&2; Exit 1; } -cat stderr >&2 +AUTOMAKE_fails $FGREP configure.in stderr : diff --git a/tests/help3.test b/tests/help3.test index 04a07d6e2..72399e3dc 100755 --- a/tests/help3.test +++ b/tests/help3.test @@ -25,8 +25,8 @@ mkdir cleandir cd cleandir # Honour user overrides for $ACLOCAL and $AUTOMAKE. -ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]* / /g'` -AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]* / /g'` +ACLOCAL=`echo " $ACLOCAL " | sed 's/ -W[^ ]*/ /g'` +AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'` cat > configure.in <