diff options
author | jmmv <jmmv@FreeBSD.org> | 2014-04-27 01:15:10 +0000 |
---|---|---|
committer | jmmv <jmmv@FreeBSD.org> | 2014-04-27 01:15:10 +0000 |
commit | 1e4589b921fdaa1b1d2fc6b6ed016f1e0a01cb8f (patch) | |
tree | 94c86cf13dedabad5bdc68f6f227b843a5161343 /usr.bin/tr/tests | |
parent | 5b12da65bf9d40526ac9ca480d639bad3cd39cf6 (diff) | |
download | FreeBSD-src-1e4589b921fdaa1b1d2fc6b6ed016f1e0a01cb8f.zip FreeBSD-src-1e4589b921fdaa1b1d2fc6b6ed016f1e0a01cb8f.tar.gz |
MFC various moves of tools/regressions/ tests to the new infrastructure.
- r263220 Migrate tools/regression/sbin/ to the new tests layout.
- r263222 Add Makefile missed in r263220.
- r263226 Migrate tools/regression/{usr.bin/lastcomm,usr.sbin}/ to the new tests layout.
- r263227 Migrate most of tools/regression/usr.bin/ to the new tests layout.
- r263345 Expand tabs that sneaked in into spaces.
- r263346 Migrate tools/regression/usr.bin/make/ to the new tests layout.
- r263348 Add Makefiles missed in r263346.
- r263351 Migrate tools/regression/usr.bin/pkill/ to the new tests layout.
- r263388 Mark multi_test as requiring /usr/share/dict/words.
- r263814 Fix path to the run.pl script to let these tests run.
- r264742 Prevent building tests when bootstrapping make.
This is 'make tinderbox' clean.
Diffstat (limited to 'usr.bin/tr/tests')
-rw-r--r-- | usr.bin/tr/tests/Makefile | 26 | ||||
-rw-r--r-- | usr.bin/tr/tests/legacy_test.sh | 6 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.00.out | 4 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.01.out | 4 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.02.out | 4 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.03.out | 4 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.04.out | 4 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.05.out | 4 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.06.out | 9 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.07.out | 9 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.08.out | 9 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.09.out | 1 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.0a.out | 1 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.0b.out | 1 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.0c.out | 1 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.0d.out | 1 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.in | 4 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress.sh | 22 | ||||
-rw-r--r-- | usr.bin/tr/tests/regress2.in | 9 |
19 files changed, 123 insertions, 0 deletions
diff --git a/usr.bin/tr/tests/Makefile b/usr.bin/tr/tests/Makefile new file mode 100644 index 0000000..58e4fadc --- /dev/null +++ b/usr.bin/tr/tests/Makefile @@ -0,0 +1,26 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/tr + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.00.out +FILES+= regress.01.out +FILES+= regress.02.out +FILES+= regress.03.out +FILES+= regress.04.out +FILES+= regress.05.out +FILES+= regress.06.out +FILES+= regress.07.out +FILES+= regress.08.out +FILES+= regress.09.out +FILES+= regress.0a.out +FILES+= regress.0b.out +FILES+= regress.0c.out +FILES+= regress.0d.out +FILES+= regress.in +FILES+= regress.sh +FILES+= regress2.in + +.include <bsd.test.mk> diff --git a/usr.bin/tr/tests/legacy_test.sh b/usr.bin/tr/tests/legacy_test.sh new file mode 100644 index 0000000..1b6b806 --- /dev/null +++ b/usr.bin/tr/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/tr/tests/regress.00.out b/usr.bin/tr/tests/regress.00.out new file mode 100644 index 0000000..5a7d1c7 --- /dev/null +++ b/usr.bin/tr/tests/regress.00.out @@ -0,0 +1,4 @@ +qui3k 2rown +fox jump54 +ov5r th5 l1zy +4og diff --git a/usr.bin/tr/tests/regress.01.out b/usr.bin/tr/tests/regress.01.out new file mode 100644 index 0000000..5252b48 --- /dev/null +++ b/usr.bin/tr/tests/regress.01.out @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/usr.bin/tr/tests/regress.02.out b/usr.bin/tr/tests/regress.02.out new file mode 100644 index 0000000..67a6dea --- /dev/null +++ b/usr.bin/tr/tests/regress.02.out @@ -0,0 +1,4 @@ +quik brown +fox jumpd +ovr th lzy +do diff --git a/usr.bin/tr/tests/regress.03.out b/usr.bin/tr/tests/regress.03.out new file mode 100644 index 0000000..c18e3cf --- /dev/null +++ b/usr.bin/tr/tests/regress.03.out @@ -0,0 +1,4 @@ +QUICK BROWN +FOX JUMPED +OVER THE LAZY +DOG diff --git a/usr.bin/tr/tests/regress.04.out b/usr.bin/tr/tests/regress.04.out new file mode 100644 index 0000000..c01413c --- /dev/null +++ b/usr.bin/tr/tests/regress.04.out @@ -0,0 +1,4 @@ +..... ..... +... ...... +.... ... .... +... diff --git a/usr.bin/tr/tests/regress.05.out b/usr.bin/tr/tests/regress.05.out new file mode 100644 index 0000000..5252b48 --- /dev/null +++ b/usr.bin/tr/tests/regress.05.out @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/usr.bin/tr/tests/regress.06.out b/usr.bin/tr/tests/regress.06.out new file mode 100644 index 0000000..5ca0a4f --- /dev/null +++ b/usr.bin/tr/tests/regress.06.out @@ -0,0 +1,9 @@ +??? bottles of beer on the wall, ??? bottles of beer. +Take one down and pass it around - ?? bottles of beer on the wall. +?? bottles of beer on the wall, ?? bottles of beer. +Take one down and pass it around - ?? bottles of beer on the wall. +... +? bottles of beer on the wall, ? bottles of beer!!! +Take one down and pass it around - ? bottle of beer on the wall. +? bottle of beer on the wall, ? bottle of beer!!! +Take it down and pass it around - NO MORE bottles of beer on the wall!!! diff --git a/usr.bin/tr/tests/regress.07.out b/usr.bin/tr/tests/regress.07.out new file mode 100644 index 0000000..999fe47 --- /dev/null +++ b/usr.bin/tr/tests/regress.07.out @@ -0,0 +1,9 @@ +### ####### ## #### ## ### ####, ### ####### ## ####. +#### ### #### ### #### ## ###### - ## ####### ## #### ## ### ####. +## ####### ## #### ## ### ####, ## ####### ## ####. +#### ### #### ### #### ## ###### - ## ####### ## #### ## ### ####. +... +# ####### ## #### ## ### ####, # ####### ## ####!!! +#### ### #### ### #### ## ###### - # ###### ## #### ## ### ####. +# ###### ## #### ## ### ####, # ###### ## ####!!! +#### ## #### ### #### ## ###### - ## #### ####### ## #### ## ### ####!!! diff --git a/usr.bin/tr/tests/regress.08.out b/usr.bin/tr/tests/regress.08.out new file mode 100644 index 0000000..34abcc1 --- /dev/null +++ b/usr.bin/tr/tests/regress.08.out @@ -0,0 +1,9 @@ +100,100. +-99. +99,99. +-98. +... +2,2!!! +-1. +1,1!!! +-!!! diff --git a/usr.bin/tr/tests/regress.09.out b/usr.bin/tr/tests/regress.09.out new file mode 100644 index 0000000..2419e3a --- /dev/null +++ b/usr.bin/tr/tests/regress.09.out @@ -0,0 +1 @@ +?# diff --git a/usr.bin/tr/tests/regress.0a.out b/usr.bin/tr/tests/regress.0a.out new file mode 100644 index 0000000..e703f63 --- /dev/null +++ b/usr.bin/tr/tests/regress.0a.out @@ -0,0 +1 @@ +$?$$$$$$$$ diff --git a/usr.bin/tr/tests/regress.0b.out b/usr.bin/tr/tests/regress.0b.out new file mode 100644 index 0000000..8d26586 --- /dev/null +++ b/usr.bin/tr/tests/regress.0b.out @@ -0,0 +1 @@ +100befbeeea100befbeeaeedadaad99befbeeea99befbeeea99befbeeaeedadaad98befbeeea2befbeeea2befbeeaeedadaad1befbeeea1befbeeea1befbeeaedadaadEbefbeeea diff --git a/usr.bin/tr/tests/regress.0c.out b/usr.bin/tr/tests/regress.0c.out new file mode 100644 index 0000000..4e125ea --- /dev/null +++ b/usr.bin/tr/tests/regress.0c.out @@ -0,0 +1 @@ +[[[[ diff --git a/usr.bin/tr/tests/regress.0d.out b/usr.bin/tr/tests/regress.0d.out new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/usr.bin/tr/tests/regress.0d.out @@ -0,0 +1 @@ + diff --git a/usr.bin/tr/tests/regress.in b/usr.bin/tr/tests/regress.in new file mode 100644 index 0000000..5252b48 --- /dev/null +++ b/usr.bin/tr/tests/regress.in @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/usr.bin/tr/tests/regress.sh b/usr.bin/tr/tests/regress.sh new file mode 100644 index 0000000..682cf23 --- /dev/null +++ b/usr.bin/tr/tests/regress.sh @@ -0,0 +1,22 @@ +# $FreeBSD$ + +echo 1..14 + +REGRESSION_START($1) + +REGRESSION_TEST(`00', `tr abcde 12345 <${SRCDIR}/regress.in') +REGRESSION_TEST(`01', `tr 12345 abcde <${SRCDIR}/regress.in') +REGRESSION_TEST(`02', `tr -d aceg <${SRCDIR}/regress.in') +REGRESSION_TEST(`03', `tr "[[:lower:]]" "[[:upper:]]" <${SRCDIR}/regress.in') +REGRESSION_TEST(`04', `tr "[[:alpha:]]" . <${SRCDIR}/regress.in') +REGRESSION_TEST(`05', `tr "[[:lower:]]" "[[:upper:]]" <${SRCDIR}/regress.in | tr "[[:upper:]]" "[[:lower:]]"') +REGRESSION_TEST(`06', `tr "[[:digit:]]" "?" <${SRCDIR}/regress2.in') +REGRESSION_TEST(`07', `tr "[[:alnum:]]" "#" <${SRCDIR}/regress2.in') +REGRESSION_TEST(`08', `tr "[[:upper:]]" "[[:lower:]]" <${SRCDIR}/regress2.in | tr -d "[^[:alpha:]] "') +REGRESSION_TEST(`09', `printf "\\f\\r\\n" | tr "\\014\\r" "?#"') +REGRESSION_TEST(`0a', `printf "0xdeadbeef\\n" | tr "x[[:xdigit:]]" "?\$"') +REGRESSION_TEST(`0b', `(tr -cd "[[:xdigit:]]" <${SRCDIR}/regress2.in ; echo)') +REGRESSION_TEST(`0c', `echo "[[[[]]]]" | tr -d "[=]=]"') +REGRESSION_TEST(`0d', `echo "]=[" | tr -d "[=]"') + +REGRESSION_END() diff --git a/usr.bin/tr/tests/regress2.in b/usr.bin/tr/tests/regress2.in new file mode 100644 index 0000000..c416463 --- /dev/null +++ b/usr.bin/tr/tests/regress2.in @@ -0,0 +1,9 @@ +100 bottles of beer on the wall, 100 bottles of beer. +Take one down and pass it around - 99 bottles of beer on the wall. +99 bottles of beer on the wall, 99 bottles of beer. +Take one down and pass it around - 98 bottles of beer on the wall. +... +2 bottles of beer on the wall, 2 bottles of beer!!! +Take one down and pass it around - 1 bottle of beer on the wall. +1 bottle of beer on the wall, 1 bottle of beer!!! +Take it down and pass it around - NO MORE bottles of beer on the wall!!! |