1# $FreeBSD: head/tools/regression/usr.bin/xargs/regress.sh 95995 2002-05-03 18:44:43Z jmallett $
| 1# $FreeBSD: head/tools/regression/usr.bin/xargs/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(`normal', `xargs echo The < regress.in') 6REGRESSION_TEST(`I', `xargs -I% echo The % % % %% % % < regress.in') 7REGRESSION_TEST(`J', `xargs -J% echo The % again. < regress.in') 8REGRESSION_TEST(`L', `xargs -L3 echo < regress.in') 9REGRESSION_TEST(`R', `xargs -I% -R1 echo The % % % %% % % < regress.in')
|
11
| 10
|
12for test in normal I J L R; do 13 echo "Running test $test" 14 case "$test" in 15 normal) 16 xargs echo The < regress.in | diff -u regress.$test.out - 17 ;; 18 I) 19 xargs -I% echo The % % % %% % % < regress.in | diff -u regress.$test.out - 20 ;; 21 J) 22 xargs -J% echo The % again. < regress.in | diff -u regress.$test.out - 23 ;; 24 L) 25 xargs -L3 echo < regress.in | diff -u regress.$test.out - 26 ;; 27 R) 28 xargs -I% -R1 echo The % % % %% % % < regress.in | diff -u regress.$test.out - 29 ;; 30 esac 31 if [ $? -eq 0 ]; then 32 echo "PASS: Test $test detected no regression, output matches." 33 else 34 STATUS=$? 35 echo "FAIL: Test $test failed: regression detected. See above." 36 fi 37done 38 39exit $STATUS
| 11REGRESSION_END()
|
| |