Tweak and/or extend some `acloca*.test' tests.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 10 Aug 2010 23:21:29 +0000 (01:21 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 10 Aug 2010 23:21:29 +0000 (01:21 +0200)
* 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.

ChangeLog
tests/acloca14.test
tests/acloca18.test
tests/acloca19.test
tests/aclocal.test
tests/aclocal5.test
tests/aclocal6.test
tests/aclocal8.test

index e39a5b8..5453722 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       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  <stefano.lattarini@gmail.com>
 
        Tweak and extend tests `pr[!0-9]*.test'.
index a4e86d7..1bdf7c7 100755 (executable)
@@ -29,6 +29,7 @@ END
 
 echo 'm4_include([a.m4])' > acinclude.m4
 echo 'm4_include([b.m4])' > a.m4
+
 cat >b.m4 <<EOF
 m4_include([c.m4])
 AC_DEFUN([AM_PROG_LIBTOOL],
@@ -38,6 +39,7 @@ AC_REQUIRE([SOMETHING_ELSE])dnl
 
 AC_DEFUN([SOMETHING])
 EOF
+
 echo 'm4_include([d.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 <<EOF
 FOO
 EOF
+
 cp aclocal.m4 stamp
 $sleep
+
 $MAKE
-grep 'defs/f.m4' aclocal.m4
+
+$FGREP defs/f.m4 aclocal.m4
 $MAKE testdist2
 
 # Make sure aclocal diagnose missing included files with correct `file:line:'.
 rm -f b.m4
 $ACLOCAL 2>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
+
+:
index c38fac4..9826892 100755 (executable)
@@ -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
+
+:
index accad81..a198d9a 100755 (executable)
@@ -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
+
+:
index d3437d2..da80d08 100755 (executable)
@@ -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"
+
+:
index 5cd8231..b206587 100755 (executable)
@@ -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
+
+:
index 266d64b..ea6bac3 100755 (executable)
@@ -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
+
+:
index ac10aff..d935f4f 100755 (executable)
@@ -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 <output`
 grep macro1.m4 aclocal.m4
 grep macro2.m4 aclocal.m4 && Exit 1
+
 :