diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-03-07 19:50:21 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 1999-03-07 19:50:21 +0000 |
commit | dda229469478d1b0ff4421ece9488f3b3a7daa4b (patch) | |
tree | 7594acac1e9aedf7a3777ec0bd90f48e78941584 /tests | |
parent | af7c52a1fd0b3f9aac1fe560c021551697dae6ef (diff) | |
download | grep-dda229469478d1b0ff4421ece9488f3b3a7daa4b.tar.gz |
change by Elie.
use default_matcher for Version display.
typos corrected.
* tests/*.awk : Linux users are seeing "Broken Pipe" on make check.
The problem is that grep does not drain its stdin, thus the previous
process in the pipeline receives a SIGPIPE. Other shells are silent
about this. There is actually no failure, since the broken pipe is
expected. You can work around it by changing the pipeline, so that
the input is drained, like this:
status=`echo 'check' | { ${GREP} -E -e pattern >/dev/null 2>&1;
echo $?; cat >/dev/null; }`; if test $status -ne $errnu then ... fi
Excerpt from email exchange with Andreas Schwab.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bre.awk | 2 | ||||
-rw-r--r-- | tests/ere.awk | 2 | ||||
-rw-r--r-- | tests/spencer1.awk | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/bre.awk b/tests/bre.awk index 5d68e0cb..9c9fef82 100644 --- a/tests/bre.awk +++ b/tests/bre.awk @@ -8,7 +8,7 @@ BEGIN { $0 ~ /^#/ { next; } NF == 3 { - printf ("status=`echo '%s' | { ${GREP} -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }\n",$3, $2); + printf ("status=`echo '%s' | { ${GREP} -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }`\n",$3, $2); printf ("if test $status -ne %s ; then\n", $1); printf ("\techo Spencer bre test \\#%d failed\n", ++n); printf ("\tfailures=1\n"); diff --git a/tests/ere.awk b/tests/ere.awk index 68a157c7..8f6a5b59 100644 --- a/tests/ere.awk +++ b/tests/ere.awk @@ -8,7 +8,7 @@ BEGIN { $0 ~ /^#/ { next; } NF == 3 { - printf ("status=`echo '%s' | { ${GREP} -E -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; } `\n",$3, $2); + printf ("status=`echo '%s' | { ${GREP} -E -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }`\n",$3, $2); printf ("if test $status -ne %s ; then\n", $1); printf ("\techo Spencer ere test \\#%d failed\n", ++n); printf ("\tfailures=1\n"); diff --git a/tests/spencer1.awk b/tests/spencer1.awk index 00df0f9c..70c6118e 100644 --- a/tests/spencer1.awk +++ b/tests/spencer1.awk @@ -4,7 +4,7 @@ BEGIN { } $0 !~ /^#/ && NF = 3 { - printf ("status=`echo '%s'| { ${GREP} -E -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }\n",$3, $2); + printf ("status=`echo '%s'| { ${GREP} -E -e '%s' > /dev/null 2>&1; echo $?; cat >/dev/null; }`\n",$3, $2); printf ("if test $status -ne %s ; then\n", $1); printf ("\techo Spencer test \\#%d failed\n", ++n); printf ("\tfailures=1\n"); |