From: Stefano Lattarini Date: Tue, 10 Aug 2010 23:21:29 +0000 (+0200) Subject: Tweak and/or extend some `acloca*.test' tests. X-Git-Tag: v1.11.1b~62^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0dd88f36a8ccc9b3c7b799b0e95b55c98fee40d;p=thirdparty%2Fautomake.git Tweak and/or extend some `acloca*.test' tests. * tests/aclocal8.test: Ensure verbose printing of captured output. * tests/aclocal.test: Likewise. Also, add trailing `:' command. * tests/acloca19.test: Likewise. * tests/aclocal5.test: Add trailing `:' command, and prefer `$me' over hard-coded test name. * tests/aclocal6.test: Likewise. * tests/aclocal18.test: Add trailing `:' command, and make some grepping slighty stricter. * tests/acloca14.test: Likewise. Also, prefer `diff' over `cmp', and add some "cosmetic" blank lines. --- diff --git a/ChangeLog b/ChangeLog index e39a5b847..5453722f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2010-08-10 Stefano Lattarini + + Tweak and/or extend some `acloca*.test' tests. + * tests/aclocal8.test: Ensure verbose printing of captured + output. + * tests/aclocal.test: Likewise. Also, add trailing `:' + command. + * tests/acloca19.test: Likewise. + * tests/aclocal5.test: Add trailing `:' command, and prefer + `$me' over hard-coded test name. + * tests/aclocal6.test: Likewise. + * tests/aclocal18.test: Add trailing `:' command, and make + some grepping slighty stricter. + * tests/acloca14.test: Likewise. Also, prefer `diff' over + `cmp', and add some "cosmetic" blank lines. + 2010-08-09 Stefano Lattarini Tweak and extend tests `pr[!0-9]*.test'. diff --git a/tests/acloca14.test b/tests/acloca14.test index a4e86d751..1bdf7c780 100755 --- a/tests/acloca14.test +++ b/tests/acloca14.test @@ -29,6 +29,7 @@ END echo 'm4_include([a.m4])' > acinclude.m4 echo 'm4_include([b.m4])' > a.m4 + cat >b.m4 < c.m4 echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4 @@ -88,26 +90,32 @@ $sleep cat >>c.m4 <<\EOF AC_DEFUN([FOO], [ANOTHER_MACRO]) EOF + $MAKE + # Because c.m4 has changed, aclocal.m4 must have been rebuilt. test `ls -1t aclocal.m4 stamp | sed 1q` = aclocal.m4 # However, since FOO is not used, f.m4 should not be included # and the contents of aclocal.m4 should remain the same -cmp aclocal.m4 stamp - +diff aclocal.m4 stamp # If FOO where to be used, that would be another story, of course. cat >>configure.in <stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 -grep 'a.m4:1:.*b.m4.*does not exist' stderr +grep 'a\.m4:1: .*b\.m4.*does not exist' stderr + +: diff --git a/tests/acloca18.test b/tests/acloca18.test index c38fac485..982689230 100755 --- a/tests/acloca18.test +++ b/tests/acloca18.test @@ -88,7 +88,7 @@ ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2' rm -f foo $ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 -grep AM_MACRO2 stderr +grep 'macro.*AM_MACRO2.*not found' stderr ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1' rm -f foo @@ -115,4 +115,6 @@ cat stderr >&2 cat stdout grep '#serial 456' stdout test ! -f 4/m1.m4 -grep 'installing.*4/m1.m4' stderr +grep 'installing.*4/m1\.m4' stderr + +: diff --git a/tests/acloca19.test b/tests/acloca19.test index accad811a..a198d9abc 100755 --- a/tests/acloca19.test +++ b/tests/acloca19.test @@ -41,9 +41,11 @@ END $ACLOCAL $AUTOCONF -./configure >stdout +./configure >stdout || { cat stdout; Exit 1; } cat stdout grep GREPME stdout grep 'aconfig\.ac' aclocal.m4 && Exit 1 grep 'bconfig\.ac' aclocal.m4 && Exit 1 grep with-grepme configure + +: diff --git a/tests/aclocal.test b/tests/aclocal.test index d3437d26c..da80d0887 100755 --- a/tests/aclocal.test +++ b/tests/aclocal.test @@ -27,18 +27,20 @@ test -f fred $ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 grep 'option.*--output.*an argument' stderr -grep help stderr +grep '[Tt]ry.*--help.*for more information' stderr $ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 grep 'unrecognized.*--unknown-option' stderr -grep help stderr +grep '[Tt]ry.*--help.*for more information' stderr $ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 grep 'unrecognized.*--ver' stderr -grep help stderr +grep '[Tt]ry.*--help.*for more information' stderr $ACLOCAL --versi test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir" + +: diff --git a/tests/aclocal5.test b/tests/aclocal5.test index 5cd823123..b206587aa 100755 --- a/tests/aclocal5.test +++ b/tests/aclocal5.test @@ -60,7 +60,7 @@ grep GREPME sub/Makefile # Make sure configure dependencies are distributed. $MAKE distdir -test -f aclocal5-1.0/m4/moredefs.m4 +test -f $me-1.0/m4/moredefs.m4 # Change the definition of AM_TEST to check that its new definition is # used. Check that AC_DEFUN_ONCE is caught. @@ -68,3 +68,5 @@ echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4 $MAKE grep 'm4/moredefs\.m4' aclocal.m4 grep '__GREPME__' configure + +: diff --git a/tests/aclocal6.test b/tests/aclocal6.test index 266d64bd2..ea6bac303 100755 --- a/tests/aclocal6.test +++ b/tests/aclocal6.test @@ -75,9 +75,9 @@ grep METOO sub/Makefile # Make sure configure dependencies are distributed. $MAKE distdir -test -f aclocal6-1.0/m4/moredefs.m4 -test -f aclocal6-1.0/m4/somedefs.m4 -test -f aclocal6-1.0/acinclude.m4 +test -f $me-1.0/m4/moredefs.m4 +test -f $me-1.0/m4/somedefs.m4 +test -f $me-1.0/acinclude.m4 # Make sure maintainer-clean works in VPATH builds. # (This is unrelated to the rest of this test.) @@ -89,3 +89,5 @@ $MAKE maintainer-clean test ! -d ../autom4te.cache test ! -f Makefile test ! -f sub/Makefile + +: diff --git a/tests/aclocal8.test b/tests/aclocal8.test index ac10aff0d..d935f4f2c 100755 --- a/tests/aclocal8.test +++ b/tests/aclocal8.test @@ -34,9 +34,9 @@ EOF echo 'AC_DEFUN([MACRO1],)' >m4/macro1.m4 echo 'AC_DEFUN([MACRO2], [AC_REQUIRE([AM_UNUSED_MACRO])])' >m4/macro2.m4 -$ACLOCAL -I m4 >output 2>&1 -cat output +$ACLOCAL -I m4 >output 2>&1 || { cat output; Exit 1; } test 0 = `wc -l