1# $FreeBSD: head/tools/regression/usr.bin/sed/regress.sh 95538 2002-04-27 02:26:23Z jmallett $
| 1# $FreeBSD: head/tools/regression/usr.bin/sed/regress.sh 98754 2002-06-24 13:52:28Z jmallett $
|
2
| 2
|
3# Go into the regression test directory, handed to us by make(1) 4TESTDIR=$1 5if [ -z "$TESTDIR" ]; then 6 TESTDIR=. 7fi 8cd $TESTDIR
| 3REGRESSION_START($1)
|
9
| 4
|
10STATUS=0
| 5REGRESSION_TEST(`G', `sed G < regress.in') 6REGRESSION_TEST(`P', `sed P < regress.in') 7REGRESSION_TEST(`psl', `sed \$!g\;P\;D < regress.in')
|
11
| 8
|
12for test in G P psl; do 13 echo "Running test $test" 14 case "$test" in 15 G) 16 sed G < regress.in | diff -u regress.$test.out - 17 ;; 18 P) 19 sed P < regress.in | diff -u regress.$test.out - 20 ;; 21 psl) 22 sed '$!g; P; D' < regress.in | diff -u regress.$test.out - 23 ;; 24 esac 25 if [ $? -eq 0 ]; then 26 echo "PASS: Test $test detected no regression, output matches." 27 else 28 STATUS=$? 29 echo "FAIL: Test $test failed: regression detected. See above." 30 fi 31done 32 33exit $STATUS
| 9REGRESSION_END()
|
| |