]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: make 'subst-no-trailing-empty-line.test' more robust
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 24 Jun 2011 08:14:30 +0000 (10:14 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 24 Jun 2011 08:14:30 +0000 (10:14 +0200)
* tests/subst-no-trailing-empty-line.test: Strengthen existing
checks, to try more scenarios and be slightly stricter in some
grepping checks.

ChangeLog
tests/subst-no-trailing-empty-line.test

index 37f029c750f7c8f85815e7e5120b0f93e93f3557..26e43d3932d7f6814bc9ee4d3a15f5b8296f3a94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: make 'subst-no-trailing-empty-line.test' more robust
+       * tests/subst-no-trailing-empty-line.test: Strengthen existing
+       checks, to try more scenarios and be slightly stricter in some
+       grepping checks.
+
 2011-06-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: fix an incomplete comment
index a970174ca69176875b4c4fe97908d164e41de873..c638b5428efeeab069ed30d56f1c273382f960d4 100755 (executable)
@@ -47,8 +47,11 @@ AUTOMAKE_OPTIONS = no-dependencies
 CC = false
 EXEEXT =
 
+## The "x" and "zardoz" strings and the use of '+=' are there to ensure
+## that these variables get rewritten by Automake.
 noinst_PROGRAMS = x @$v1@ @$v2@ @$v3@
-bin_PROGRAMS = @A@ mu @$v2@ @$v3@
+bin_PROGRAMS = @A@
+bin_PROGRAMS += @$v1@ @$v2@ @$v3@
 check_PROGRAMS = zardoz \$(noinst_PROGRAMS)
 
 ## Required whenever there are @substituted@ values in the
@@ -67,13 +70,14 @@ $AUTOMAKE
 # For debugging.
 $EGREP -n 'ABCD|am__empty' Makefile.in
 # Sanity check.
-test `$EGREP -c "^[ $tab]*@$v2@ @$v3@[ $tab]*$bs?$" Makefile.in` -eq 2
+test `$EGREP -c "^[ $tab]*@$v2@ @$v3@[ $tab]*$bs?$" Makefile.in` -eq 3
 
 ./configure
 {
-  sed -n '/^noinst_PROGRAMS =/,/[^\\]$/p' Makefile
-  sed -n '/^bin_PROGRAMS =/,/[^\\]$/p' Makefile
-  sed -n '/^check_PROGRAMS =/,/[^\\]$/p' Makefile
+  sed -n '/^noinst_PROGRAMS *=/,/[^\\]$/p' Makefile
+  sed -n '/^bin_PROGRAMS *=/,/[^\\]$/p' Makefile
+  sed -n '/^check_PROGRAMS *=/,/[^\\]$/p' Makefile
+  sed -n '/^am__EXEEXT.*=/,/[^\\]$/p' Makefile
 } >t-programs
 cat t-programs
 grep '^ *$' t-programs && Exit 1
@@ -81,13 +85,13 @@ grep '^ *$' t-programs && Exit 1
 $MAKE print-programs >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep '^BEG1: x :END1$' stdout
-grep '^BEG2: mu :END2$' stdout
+grep '^BEG2: :END2$' stdout
 grep '^BEG3: zardoz x :END3$' stdout
 
 am__empty=X $MAKE -e print-programs >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep '^BEG1: x X :END1$' stdout
-grep '^BEG2: mu X :END2$' stdout
+grep '^BEG2: X :END2$' stdout
 grep '^BEG3: zardoz x X :END3$' stdout
 
 :