automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-


From: Eric Blake
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-115-gce864ac
Date: Wed, 23 Jan 2008 22:28:57 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=ce864ac1b0bf920739d28f6cc574b48bf7d3bfb2

The branch, master has been updated
       via  ce864ac1b0bf920739d28f6cc574b48bf7d3bfb2 (commit)
      from  da88206c11a92043d825e9f24731619ba11bc507 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ce864ac1b0bf920739d28f6cc574b48bf7d3bfb2
Author: Eric Blake <address@hidden>
Date:   Wed Jan 23 10:03:58 2008 -0700

    Fix color.test when using BSD grep.
    
    * tests/color.test: Ensure that grep can handle non-printing
    characters.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    6 ++++++
 tests/color.test |   30 ++++++++++++++++++++----------
 2 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 605dd92..649e9ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-23  Eric Blake  <address@hidden>
+
+       Fix color.test when using BSD grep.
+       * tests/color.test: Ensure that grep can handle non-printing
+       characters.
+
 2008-01-23  Ralf Wildenhues  <address@hidden>
 
        * tests/lisp3.test: Fix typo.
diff --git a/tests/color.test b/tests/color.test
index 5b51287..dd4ded5 100755
--- a/tests/color.test
+++ b/tests/color.test
@@ -29,6 +29,14 @@ lgn=''
 blu=''
 std=''
 
+# Check that grep can parse nonprinting characters.
+# BSD 'grep' works from a pipe, but not a seekable file.
+# GNU or BSD 'grep -a' works on files, but is not portable.
+case `echo "$std" | grep .` in
+  $std) ;;
+  *) exit 77 ;;
+esac
+
 cat >>configure.in <<END
 AC_OUTPUT
 END
@@ -66,20 +74,22 @@ $AUTOCONF
 
 test_color ()
 {
-  grep ": pass" stdout | $FGREP "$grn"
-  grep ": fail" stdout | $FGREP "$red"
-  grep ": xfail" stdout | $FGREP "$lgn"
-  grep ": xpass" stdout | $FGREP "$red"
-  grep ": skip" stdout | $FGREP "$blu"
+  # Not a useless use of cat; see above comments about grep.
+  cat stdout | grep ": pass" | $FGREP "$grn"
+  cat stdout | grep ": fail" | $FGREP "$red"
+  cat stdout | grep ": xfail" | $FGREP "$lgn"
+  cat stdout | grep ": xpass" | $FGREP "$red"
+  cat stdout | grep ": skip" | $FGREP "$blu"
 }
 
 test_no_color ()
 {
-  grep ": pass" stdout | $FGREP "$grn" && exit 1
-  grep ": fail" stdout | $FGREP "$red" && exit 1
-  grep ": xfail" stdout | $FGREP "$lgn" && exit 1
-  grep ": xpass" stdout | $FGREP "$red" && exit 1
-  grep ": skip" stdout | $FGREP "$blu" && exit 1
+  # Not a useless use of cat; see above comments about grep.
+  cat stdout | grep ": pass" | $FGREP "$grn" && exit 1
+  cat stdout | grep ": fail" | $FGREP "$red" && exit 1
+  cat stdout | grep ": xfail" | $FGREP "$lgn" && exit 1
+  cat stdout | grep ": xpass" | $FGREP "$red" && exit 1
+  cat stdout | grep ": skip" | $FGREP "$blu" && exit 1
   :
 }
 


hooks/post-receive
--
GNU Automake




reply via email to

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