diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-04-20 18:46:33 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-04-20 18:46:33 +0000 |
commit | c5bca421d9f59f412886b51e99d578df72fa1269 (patch) | |
tree | 9ad4bf0413b6523a315ac540668bf74c277271bf /tools/regression/usr.bin/xargs | |
parent | e9f37843940b64df7aec2c86132e0b1cd043dec4 (diff) | |
download | FreeBSD-src-c5bca421d9f59f412886b51e99d578df72fa1269.zip FreeBSD-src-c5bca421d9f59f412886b51e99d578df72fa1269.tar.gz |
Add regression tests for parts of xargs(1).
Diffstat (limited to 'tools/regression/usr.bin/xargs')
-rw-r--r-- | tools/regression/usr.bin/xargs/Makefile | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/xargs/regress.I.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/xargs/regress.J.out | 1 | ||||
-rw-r--r-- | tools/regression/usr.bin/xargs/regress.L.out | 2 | ||||
-rw-r--r-- | tools/regression/usr.bin/xargs/regress.in | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/xargs/regress.normal.out | 1 | ||||
-rw-r--r-- | tools/regression/usr.bin/xargs/regress.sh | 32 |
7 files changed, 48 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/xargs/Makefile b/tools/regression/usr.bin/xargs/Makefile new file mode 100644 index 0000000..9903670 --- /dev/null +++ b/tools/regression/usr.bin/xargs/Makefile @@ -0,0 +1,4 @@ +# $FreeBSD$ + +all: + @sh ${.CURDIR}/regress.sh ${.CURDIR} diff --git a/tools/regression/usr.bin/xargs/regress.I.out b/tools/regression/usr.bin/xargs/regress.I.out new file mode 100644 index 0000000..921a4f1 --- /dev/null +++ b/tools/regression/usr.bin/xargs/regress.I.out @@ -0,0 +1,4 @@ +The quick brown quick brown quick brown quick brownquick brown quick brown % +The fox jumped fox jumped fox jumped fox jumpedfox jumped fox jumped % +The over the lazy over the lazy over the lazy over the lazyover the lazy over the lazy % +The dog dog dog dogdog dog % dog the diff --git a/tools/regression/usr.bin/xargs/regress.J.out b/tools/regression/usr.bin/xargs/regress.J.out new file mode 100644 index 0000000..b88a41e --- /dev/null +++ b/tools/regression/usr.bin/xargs/regress.J.out @@ -0,0 +1 @@ +The quick brown fox jumped over the lazy dog again. diff --git a/tools/regression/usr.bin/xargs/regress.L.out b/tools/regression/usr.bin/xargs/regress.L.out new file mode 100644 index 0000000..7359dee --- /dev/null +++ b/tools/regression/usr.bin/xargs/regress.L.out @@ -0,0 +1,2 @@ +quick brown fox jumped over the lazy +dog diff --git a/tools/regression/usr.bin/xargs/regress.in b/tools/regression/usr.bin/xargs/regress.in new file mode 100644 index 0000000..5252b48 --- /dev/null +++ b/tools/regression/usr.bin/xargs/regress.in @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/tools/regression/usr.bin/xargs/regress.normal.out b/tools/regression/usr.bin/xargs/regress.normal.out new file mode 100644 index 0000000..458d9cb --- /dev/null +++ b/tools/regression/usr.bin/xargs/regress.normal.out @@ -0,0 +1 @@ +The quick brown fox jumped over the lazy dog diff --git a/tools/regression/usr.bin/xargs/regress.sh b/tools/regression/usr.bin/xargs/regress.sh new file mode 100644 index 0000000..fa8b7ee --- /dev/null +++ b/tools/regression/usr.bin/xargs/regress.sh @@ -0,0 +1,32 @@ +# $FreeBSD$ + +# Go into the regression test directory, handed to us by make(1) +TESTDIR=$1 +if [ -z "$TESTDIR" ]; then + TESTDIR=. +fi +cd $TESTDIR + +for test in normal I J L; do + echo "Running test $test" + case "$test" in + normal) + xargs echo The < regress.in | diff -u regress.$test.out - + ;; + I) + xargs -I% echo The % % % %% % % < regress.in | diff -u regress.$test.out - + ;; + J) + xargs -J% echo The % again. < regress.in | diff -u regress.$test.out - + ;; + L) + xargs -L3 echo < regress.in | diff -u regress.$test.out - + ;; + esac + if [ $? -eq 0 ]; then + echo "Test $test detected no regression, output matches." + else + echo "Test $test failed: regression detected. See above." + exit 1 + fi +done |