freebsd-dev/tools/regression/usr.bin/sed/regress.sh
Juli Mallett 624abf8519 Prefix tests with PASS and FAIL, to make grepping easier, and note this in
the README.

This affects only the base-system regression tests, of course.
2002-04-27 02:26:23 +00:00

34 lines
645 B
Bash

# $FreeBSD$
# Go into the regression test directory, handed to us by make(1)
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
TESTDIR=.
fi
cd $TESTDIR
STATUS=0
for test in G P psl; do
echo "Running test $test"
case "$test" in
G)
sed G < regress.in | diff -u regress.$test.out -
;;
P)
sed P < regress.in | diff -u regress.$test.out -
;;
psl)
sed '$!g; P; D' < regress.in | diff -u regress.$test.out -
;;
esac
if [ $? -eq 0 ]; then
echo "PASS: Test $test detected no regression, output matches."
else
STATUS=$?
echo "FAIL: Test $test failed: regression detected. See above."
fi
done
exit $STATUS