* 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>.
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; \
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