summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/grep/tests/spencer1.awk
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/grep/tests/spencer1.awk')
-rw-r--r--gnu/usr.bin/grep/tests/spencer1.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/grep/tests/spencer1.awk b/gnu/usr.bin/grep/tests/spencer1.awk
index b66b8f5..70c6118 100644
--- a/gnu/usr.bin/grep/tests/spencer1.awk
+++ b/gnu/usr.bin/grep/tests/spencer1.awk
@@ -4,8 +4,8 @@ BEGIN {
}
$0 !~ /^#/ && NF = 3 {
- printf ("echo '%s'|${GREP} -E -e '%s' > /dev/null 2>&1\n",$3, $2);
- printf ("if test $? -ne %s ; then\n", $1);
+ 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");
printf ("fi\n");
OpenPOWER on IntegriCloud