From ce864ac1b0bf920739d28f6cc574b48bf7d3bfb2 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 23 Jan 2008 10:03:58 -0700 Subject: [PATCH] Fix color.test when using BSD grep. * tests/color.test: Ensure that grep can handle non-printing characters. Signed-off-by: Eric Blake --- ChangeLog | 6 ++++++ tests/color.test | 30 ++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 605dd9233..649e9ac7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-01-23 Eric Blake + + Fix color.test when using BSD grep. + * tests/color.test: Ensure that grep can handle non-printing + characters. + 2008-01-23 Ralf Wildenhues * tests/lisp3.test: Fix typo. diff --git a/tests/color.test b/tests/color.test index 5b51287a6..dd4ded590 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 <