automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] Fix nits and bugs in tests `help*.test'


From: Stefano Lattarini
Subject: [FYI] Fix nits and bugs in tests `help*.test'
Date: Mon, 4 Oct 2010 18:34:56 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Hmpf.  The patch I pushed still contained minor bugs and nits.
Fixed with this follow-up patch (already pushed to maint).

Sorry for the noise,
  Stefano
From 2e5bd8fc803924124e8512c5bdc17a581f70940c Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Mon, 4 Oct 2010 18:17:22 +0200
Subject: [PATCH] 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.
---
 ChangeLog        |   11 +++++++++++
 tests/help.test  |   11 +++++------
 tests/help2.test |    9 ++++-----
 tests/help3.test |    6 +++---
 tests/help4.test |    4 ++--
 5 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 06a6e47..03187aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-04  Stefano Lattarini  <address@hidden>
+
+       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  <address@hidden>
            Ralf Wildenhues  <address@hidden>
 
diff --git a/tests/help.test b/tests/help.test
index 012e1d7..b09db41 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 <http://www.gnu.org/licenses/>.
 
-# 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 or
+# 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 7a05aca..5212092 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 04a07d6..72399e3 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 <<END
 AC_INIT([$me], [1.0])
@@ -48,7 +48,7 @@ test ! -r foo.m4
 $ACLOCAL --output=foo.m4 --force
 test -f foo.m4
 
-mv -f foo.m4 aclocal.m4 # automake will need aclocal.m4
+mv -f foo.m4 aclocal.m4 # autoconf will need aclocal.m4
 
 $AUTOMAKE --add-missing --help --copy
 test ! -r install-sh
diff --git a/tests/help4.test b/tests/help4.test
index 117a073..c5eb31e 100755
--- a/tests/help4.test
+++ b/tests/help4.test
@@ -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'`
 
 escape_dots () { sed 's/\./\\./g'; } # avoid issues with `\' in backquotes
 apiversion_rx=`echo "$APIVERSION" | escape_dots`
-- 
1.7.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]