diff options
| author | Julio Merino <jmmv@FreeBSD.org> | 2014-03-16 08:04:06 +0000 |
|---|---|---|
| committer | Julio Merino <jmmv@FreeBSD.org> | 2014-03-16 08:04:06 +0000 |
| commit | 3a92d97ff0f22d21608e1c19b83104c4937523b6 (patch) | |
| tree | a434fba265da51ef79b1cfc4461e1080dbe53e90 /usr.bin/xargs/tests | |
| parent | d14afb2adcbf0db6625f582abf0c7154e4e005bd (diff) | |
Notes
Diffstat (limited to 'usr.bin/xargs/tests')
| -rw-r--r-- | usr.bin/xargs/tests/Makefile | 26 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/legacy_test.sh | 6 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.0.in | bin | 0 -> 86 bytes | |||
| -rw-r--r-- | usr.bin/xargs/tests/regress.0.out | 8 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.0I.out | 18 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.0J.out | 4 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.0L.out | 6 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.I.out | 4 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.J.out | 1 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.L.out | 2 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.R.out | 4 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.in | 4 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.n1.out | 8 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.n2.out | 4 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.n3.out | 3 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.normal.out | 1 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.quotes.in | 4 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.quotes.out | 7 | ||||
| -rw-r--r-- | usr.bin/xargs/tests/regress.sh | 21 |
19 files changed, 131 insertions, 0 deletions
diff --git a/usr.bin/xargs/tests/Makefile b/usr.bin/xargs/tests/Makefile new file mode 100644 index 000000000000..2004d797f5df --- /dev/null +++ b/usr.bin/xargs/tests/Makefile @@ -0,0 +1,26 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/xargs + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.0.in +FILES+= regress.0.out +FILES+= regress.0I.out +FILES+= regress.0J.out +FILES+= regress.0L.out +FILES+= regress.I.out +FILES+= regress.J.out +FILES+= regress.L.out +FILES+= regress.R.out +FILES+= regress.in +FILES+= regress.n1.out +FILES+= regress.n2.out +FILES+= regress.n3.out +FILES+= regress.normal.out +FILES+= regress.quotes.in +FILES+= regress.quotes.out +FILES+= regress.sh + +.include <bsd.test.mk> diff --git a/usr.bin/xargs/tests/legacy_test.sh b/usr.bin/xargs/tests/legacy_test.sh new file mode 100644 index 000000000000..1b6b806c5980 --- /dev/null +++ b/usr.bin/xargs/tests/legacy_test.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# $FreeBSD$ + +SRCDIR="$(dirname "${0}")"; export SRCDIR + +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh diff --git a/usr.bin/xargs/tests/regress.0.in b/usr.bin/xargs/tests/regress.0.in Binary files differnew file mode 100644 index 000000000000..448ba5367d4e --- /dev/null +++ b/usr.bin/xargs/tests/regress.0.in diff --git a/usr.bin/xargs/tests/regress.0.out b/usr.bin/xargs/tests/regress.0.out new file mode 100644 index 000000000000..2bc97257af69 --- /dev/null +++ b/usr.bin/xargs/tests/regress.0.out @@ -0,0 +1,8 @@ +quick ' brown +fox jumped +over "the lazy +dog +quick brown fox +jumped over the +lazy dog + diff --git a/usr.bin/xargs/tests/regress.0I.out b/usr.bin/xargs/tests/regress.0I.out new file mode 100644 index 000000000000..16009c092b01 --- /dev/null +++ b/usr.bin/xargs/tests/regress.0I.out @@ -0,0 +1,18 @@ +The quick ' brown quick ' brownquick ' brown quick ' brown +The fox jumped +over "the lazy fox jumped +over "the lazyfox jumped +over "the lazy fox jumped +over "the lazy +The +The dog +quick brown fox dog +quick brown foxdog +quick brown fox dog +quick brown fox +The jumped over the jumped over thejumped over the jumped over the +The lazy dog + lazy dog +lazy dog + lazy dog + diff --git a/usr.bin/xargs/tests/regress.0J.out b/usr.bin/xargs/tests/regress.0J.out new file mode 100644 index 000000000000..69c87f9fa52e --- /dev/null +++ b/usr.bin/xargs/tests/regress.0J.out @@ -0,0 +1,4 @@ +The quick ' brown fox jumped +over "the lazy dog +quick brown fox jumped over the lazy dog + again. diff --git a/usr.bin/xargs/tests/regress.0L.out b/usr.bin/xargs/tests/regress.0L.out new file mode 100644 index 000000000000..2d13fcc0d388 --- /dev/null +++ b/usr.bin/xargs/tests/regress.0L.out @@ -0,0 +1,6 @@ +quick ' brown fox jumped +over "the lazy +dog +quick brown fox +jumped over the lazy dog + diff --git a/usr.bin/xargs/tests/regress.I.out b/usr.bin/xargs/tests/regress.I.out new file mode 100644 index 000000000000..f2a6a1e82e22 --- /dev/null +++ b/usr.bin/xargs/tests/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 % diff --git a/usr.bin/xargs/tests/regress.J.out b/usr.bin/xargs/tests/regress.J.out new file mode 100644 index 000000000000..b88a41e5076b --- /dev/null +++ b/usr.bin/xargs/tests/regress.J.out @@ -0,0 +1 @@ +The quick brown fox jumped over the lazy dog again. diff --git a/usr.bin/xargs/tests/regress.L.out b/usr.bin/xargs/tests/regress.L.out new file mode 100644 index 000000000000..7359dee8f366 --- /dev/null +++ b/usr.bin/xargs/tests/regress.L.out @@ -0,0 +1,2 @@ +quick brown fox jumped over the lazy +dog diff --git a/usr.bin/xargs/tests/regress.R.out b/usr.bin/xargs/tests/regress.R.out new file mode 100644 index 000000000000..6fe947f0d9e4 --- /dev/null +++ b/usr.bin/xargs/tests/regress.R.out @@ -0,0 +1,4 @@ +The quick brown % % %% % % +The fox jumped % % %% % % +The over the lazy % % %% % % +The dog % % %% % % diff --git a/usr.bin/xargs/tests/regress.in b/usr.bin/xargs/tests/regress.in new file mode 100644 index 000000000000..5252b480a520 --- /dev/null +++ b/usr.bin/xargs/tests/regress.in @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/usr.bin/xargs/tests/regress.n1.out b/usr.bin/xargs/tests/regress.n1.out new file mode 100644 index 000000000000..77ef6c555c2d --- /dev/null +++ b/usr.bin/xargs/tests/regress.n1.out @@ -0,0 +1,8 @@ +quick +brown +fox +jumped +over +the +lazy +dog diff --git a/usr.bin/xargs/tests/regress.n2.out b/usr.bin/xargs/tests/regress.n2.out new file mode 100644 index 000000000000..4fa3f55161d6 --- /dev/null +++ b/usr.bin/xargs/tests/regress.n2.out @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the +lazy dog diff --git a/usr.bin/xargs/tests/regress.n3.out b/usr.bin/xargs/tests/regress.n3.out new file mode 100644 index 000000000000..21b2c1e97416 --- /dev/null +++ b/usr.bin/xargs/tests/regress.n3.out @@ -0,0 +1,3 @@ +quick brown fox +jumped over the +lazy dog diff --git a/usr.bin/xargs/tests/regress.normal.out b/usr.bin/xargs/tests/regress.normal.out new file mode 100644 index 000000000000..458d9cb930c4 --- /dev/null +++ b/usr.bin/xargs/tests/regress.normal.out @@ -0,0 +1 @@ +The quick brown fox jumped over the lazy dog diff --git a/usr.bin/xargs/tests/regress.quotes.in b/usr.bin/xargs/tests/regress.quotes.in new file mode 100644 index 000000000000..11388a05b046 --- /dev/null +++ b/usr.bin/xargs/tests/regress.quotes.in @@ -0,0 +1,4 @@ +a 'b "c' \'d +e\ f "g ' h" +i\ +j diff --git a/usr.bin/xargs/tests/regress.quotes.out b/usr.bin/xargs/tests/regress.quotes.out new file mode 100644 index 000000000000..f79ad41ad0fd --- /dev/null +++ b/usr.bin/xargs/tests/regress.quotes.out @@ -0,0 +1,7 @@ +a +b "c +'d +e f +g ' h +i +j diff --git a/usr.bin/xargs/tests/regress.sh b/usr.bin/xargs/tests/regress.sh new file mode 100644 index 000000000000..316365d95d6e --- /dev/null +++ b/usr.bin/xargs/tests/regress.sh @@ -0,0 +1,21 @@ +# $FreeBSD$ + +echo 1..13 + +REGRESSION_START($1) + +REGRESSION_TEST(`normal', `xargs echo The <${SRCDIR}/regress.in') +REGRESSION_TEST(`I', `xargs -I% echo The % % % %% % % <${SRCDIR}/regress.in') +REGRESSION_TEST(`J', `xargs -J% echo The % again. <${SRCDIR}/regress.in') +REGRESSION_TEST(`L', `xargs -L3 echo <${SRCDIR}/regress.in') +REGRESSION_TEST(`R', `xargs -I% -R1 echo The % % % %% % % <${SRCDIR}/regress.in') +REGRESSION_TEST(`n1', `xargs -n1 echo <${SRCDIR}/regress.in') +REGRESSION_TEST(`n2', `xargs -n2 echo <${SRCDIR}/regress.in') +REGRESSION_TEST(`n3', `xargs -n3 echo <${SRCDIR}/regress.in') +REGRESSION_TEST(`0', `xargs -0 -n1 echo <${SRCDIR}/regress.0.in') +REGRESSION_TEST(`0I', `xargs -0 -I% echo The % %% % <${SRCDIR}/regress.0.in') +REGRESSION_TEST(`0J', `xargs -0 -J% echo The % again. <${SRCDIR}/regress.0.in') +REGRESSION_TEST(`0L', `xargs -0 -L2 echo <${SRCDIR}/regress.0.in') +REGRESSION_TEST(`quotes', `xargs -n1 echo <${SRCDIR}/regress.quotes.in') + +REGRESSION_END() |
