On 06/11/2013 04:01 PM, Steven M. Schweda wrote: > + zgrep -15 17 - > grep: illegal option -- 1 > grep: illegal option -- 5
Thanks, for that part of the problem I installed this patch: >From ae9f3fd0e46733829b62cb485a136d1894e77a0c Mon Sep 17 00:00:00 2001 From: Paul Eggert <egg...@cs.ucla.edu> Date: Tue, 11 Jun 2013 20:23:28 -0700 Subject: [PATCH] tests: zgrep-context assumes grep knows context * tests/Makefile.am (TESTS_ENVIRONMENT): Pass GREP too. * tests/zgrep-context: Check that the underlying grep supports context options. Problem reported by Steven M. Schweda in <http://lists.gnu.org/archive/html/bug-gzip/2013-06/msg00010.html>. --- tests/Makefile.am | 1 + tests/zgrep-context | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index 53bfffa..37c7b8c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -79,6 +79,7 @@ TESTS_ENVIRONMENT = \ srcdir='$(srcdir)'; export srcdir; \ top_srcdir='$(top_srcdir)'; export top_srcdir; \ CC='$(CC)'; export CC; \ + GREP='$(GREP)'; export GREP; \ GZIP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'`; export GZIP_TEST_NAME; \ MAKE=$(MAKE); export MAKE; \ PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'; export PACKAGE_BUGREPORT; \ diff --git a/tests/zgrep-context b/tests/zgrep-context index f2e26d2..a3871eb 100755 --- a/tests/zgrep-context +++ b/tests/zgrep-context @@ -34,6 +34,12 @@ seq 40 > in || framework_failure_ gzip < in > in.gz || framework_failure_ seq 2 32 > exp || framework_failure_ +: ${GREP=grep} +$GREP -15 17 - < in > out && compare exp out || { + echo >&2 "$0: $GREP does not support context options; skipping this test" + exit 77 +} + fail=0 zgrep -15 17 - < in.gz > out || fail=1 compare exp out || fail=1 -- 1.7.11.7