freebsd-dev/gnu/usr.bin/grep/tests/check.sh
Peter Wemm c18f2d82a5 Back out the botched attempt to update to gnu grep 2.3 (lots of history
was lost).  Restore original version to try and avoid breaking the build
while David O'brien does a proper set of imports and merges.

Requested by:	obrien
1999-11-20 09:40:28 +00:00

25 lines
530 B
Bash

#! /bin/sh
# Regression test for GNU grep.
# Usage: regress.sh [testdir]
testdir=${1-tests}
failures=0
# The Khadafy test is brought to you by Scott Anderson . . .
./grep -E -f $testdir/khadafy.regexp $testdir/khadafy.lines > khadafy.out
if cmp $testdir/khadafy.lines khadafy.out
then
:
else
echo Khadafy test failed -- output left on khadafy.out
failures=1
fi
# . . . and the following by Henry Spencer.
${AWK-awk} -F: -f $testdir/scriptgen.awk $testdir/spencer.tests > tmp.script
sh tmp.script && exit $failures
exit 1