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/apply/tests | |
| parent | d14afb2adcbf0db6625f582abf0c7154e4e005bd (diff) | |
Notes
Diffstat (limited to 'usr.bin/apply/tests')
| -rw-r--r-- | usr.bin/apply/tests/Makefile | 14 | ||||
| -rw-r--r-- | usr.bin/apply/tests/legacy_test.sh | 6 | ||||
| -rw-r--r-- | usr.bin/apply/tests/regress.00.in | 1 | ||||
| -rw-r--r-- | usr.bin/apply/tests/regress.00.out | 1 | ||||
| -rw-r--r-- | usr.bin/apply/tests/regress.01.out | 1 | ||||
| -rw-r--r-- | usr.bin/apply/tests/regress.01.sh | 15 | ||||
| -rw-r--r-- | usr.bin/apply/tests/regress.sh | 10 |
7 files changed, 48 insertions, 0 deletions
diff --git a/usr.bin/apply/tests/Makefile b/usr.bin/apply/tests/Makefile new file mode 100644 index 000000000000..332bf7db169c --- /dev/null +++ b/usr.bin/apply/tests/Makefile @@ -0,0 +1,14 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/apply + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.00.in +FILES+= regress.00.out +FILES+= regress.01.out +FILES+= regress.01.sh +FILES+= regress.sh + +.include <bsd.test.mk> diff --git a/usr.bin/apply/tests/legacy_test.sh b/usr.bin/apply/tests/legacy_test.sh new file mode 100644 index 000000000000..1b6b806c5980 --- /dev/null +++ b/usr.bin/apply/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/apply/tests/regress.00.in b/usr.bin/apply/tests/regress.00.in new file mode 100644 index 000000000000..8282be782435 --- /dev/null +++ b/usr.bin/apply/tests/regress.00.in @@ -0,0 +1 @@ +12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 diff --git a/usr.bin/apply/tests/regress.00.out b/usr.bin/apply/tests/regress.00.out new file mode 100644 index 000000000000..c725cb2fa98c --- /dev/null +++ b/usr.bin/apply/tests/regress.00.out @@ -0,0 +1 @@ +12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012 diff --git a/usr.bin/apply/tests/regress.01.out b/usr.bin/apply/tests/regress.01.out new file mode 100644 index 000000000000..bcf5ab29339a --- /dev/null +++ b/usr.bin/apply/tests/regress.01.out @@ -0,0 +1 @@ +apply: Argument list too long diff --git a/usr.bin/apply/tests/regress.01.sh b/usr.bin/apply/tests/regress.01.sh new file mode 100644 index 000000000000..db5f1d4cd82c --- /dev/null +++ b/usr.bin/apply/tests/regress.01.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +SHELL=/bin/sh; export SHELL + +ARG_MAX=$(getconf ARG_MAX) +ARG_MAX_HALF=$((ARG_MAX / 2)) + +apply 'echo %1 %1 %1' $(jot $ARG_MAX_HALF 1 1 | tr -d '\n') 2>&1 + +if [ $? -eq 0 ]; then + return 1 +else + return 0 +fi diff --git a/usr.bin/apply/tests/regress.sh b/usr.bin/apply/tests/regress.sh new file mode 100644 index 000000000000..0a20d50ee3bc --- /dev/null +++ b/usr.bin/apply/tests/regress.sh @@ -0,0 +1,10 @@ +# $FreeBSD$ + +echo 1..2 + +REGRESSION_START($1) + +REGRESSION_TEST(`00', `apply "echo %1 %1 %1 %1" $(cat ${SRCDIR}/regress.00.in)') +REGRESSION_TEST(`01', `sh ${SRCDIR}/regress.01.sh') + +REGRESSION_END() |
