diff options
Diffstat (limited to 'gnu/usr.bin/grep/tests/check.sh')
-rw-r--r-- | gnu/usr.bin/grep/tests/check.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/usr.bin/grep/tests/check.sh b/gnu/usr.bin/grep/tests/check.sh new file mode 100644 index 0000000..d2c8fdb --- /dev/null +++ b/gnu/usr.bin/grep/tests/check.sh @@ -0,0 +1,24 @@ +#! /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 |