diff options
author | keramida <keramida@FreeBSD.org> | 2008-01-13 08:33:20 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2008-01-13 08:33:20 +0000 |
commit | fb6f1f06031630f8933edacd23c3cd8525ecf17b (patch) | |
tree | 102a46c7d07f75360226febb72c13e2562e5221f /tools | |
parent | 4cd8e2985163f494004b9c23e8a448b48a18b66a (diff) | |
download | FreeBSD-src-fb6f1f06031630f8933edacd23c3cd8525ecf17b.zip FreeBSD-src-fb6f1f06031630f8933edacd23c3cd8525ecf17b.tar.gz |
Add a new set of regression tests, for the tr(1) utility.
Approved by: das, dds
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/usr.bin/tr/Makefile | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.00.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.01.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.02.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.03.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.04.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.05.out | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.06.out | 9 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.07.out | 9 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.08.out | 9 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.09.out | 1 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.0a.out | 1 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.0b.out | 1 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.in | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.sh | 20 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress.t | 6 | ||||
-rw-r--r-- | tools/regression/usr.bin/tr/regress2.in | 9 |
17 files changed, 97 insertions, 0 deletions
diff --git a/tools/regression/usr.bin/tr/Makefile b/tools/regression/usr.bin/tr/Makefile new file mode 100644 index 0000000..b937d41 --- /dev/null +++ b/tools/regression/usr.bin/tr/Makefile @@ -0,0 +1,4 @@ +# $FreeBSD$ + +all: + @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} diff --git a/tools/regression/usr.bin/tr/regress.00.out b/tools/regression/usr.bin/tr/regress.00.out new file mode 100644 index 0000000..5a7d1c7 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.00.out @@ -0,0 +1,4 @@ +qui3k 2rown +fox jump54 +ov5r th5 l1zy +4og diff --git a/tools/regression/usr.bin/tr/regress.01.out b/tools/regression/usr.bin/tr/regress.01.out new file mode 100644 index 0000000..5252b48 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.01.out @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/tools/regression/usr.bin/tr/regress.02.out b/tools/regression/usr.bin/tr/regress.02.out new file mode 100644 index 0000000..67a6dea --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.02.out @@ -0,0 +1,4 @@ +quik brown +fox jumpd +ovr th lzy +do diff --git a/tools/regression/usr.bin/tr/regress.03.out b/tools/regression/usr.bin/tr/regress.03.out new file mode 100644 index 0000000..c18e3cf --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.03.out @@ -0,0 +1,4 @@ +QUICK BROWN +FOX JUMPED +OVER THE LAZY +DOG diff --git a/tools/regression/usr.bin/tr/regress.04.out b/tools/regression/usr.bin/tr/regress.04.out new file mode 100644 index 0000000..c01413c --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.04.out @@ -0,0 +1,4 @@ +..... ..... +... ...... +.... ... .... +... diff --git a/tools/regression/usr.bin/tr/regress.05.out b/tools/regression/usr.bin/tr/regress.05.out new file mode 100644 index 0000000..5252b48 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.05.out @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/tools/regression/usr.bin/tr/regress.06.out b/tools/regression/usr.bin/tr/regress.06.out new file mode 100644 index 0000000..5ca0a4f --- /dev/null +++ b/tools/regression/usr.bin/tr/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/tools/regression/usr.bin/tr/regress.07.out b/tools/regression/usr.bin/tr/regress.07.out new file mode 100644 index 0000000..999fe47 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.07.out @@ -0,0 +1,9 @@ +### ####### ## #### ## ### ####, ### ####### ## ####. +#### ### #### ### #### ## ###### - ## ####### ## #### ## ### ####. +## ####### ## #### ## ### ####, ## ####### ## ####. +#### ### #### ### #### ## ###### - ## ####### ## #### ## ### ####. +... +# ####### ## #### ## ### ####, # ####### ## ####!!! +#### ### #### ### #### ## ###### - # ###### ## #### ## ### ####. +# ###### ## #### ## ### ####, # ###### ## ####!!! +#### ## #### ### #### ## ###### - ## #### ####### ## #### ## ### ####!!! diff --git a/tools/regression/usr.bin/tr/regress.08.out b/tools/regression/usr.bin/tr/regress.08.out new file mode 100644 index 0000000..34abcc1 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.08.out @@ -0,0 +1,9 @@ +100,100. +-99. +99,99. +-98. +... +2,2!!! +-1. +1,1!!! +-!!! diff --git a/tools/regression/usr.bin/tr/regress.09.out b/tools/regression/usr.bin/tr/regress.09.out new file mode 100644 index 0000000..2419e3a --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.09.out @@ -0,0 +1 @@ +?# diff --git a/tools/regression/usr.bin/tr/regress.0a.out b/tools/regression/usr.bin/tr/regress.0a.out new file mode 100644 index 0000000..e703f63 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.0a.out @@ -0,0 +1 @@ +$?$$$$$$$$ diff --git a/tools/regression/usr.bin/tr/regress.0b.out b/tools/regression/usr.bin/tr/regress.0b.out new file mode 100644 index 0000000..8d26586 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.0b.out @@ -0,0 +1 @@ +100befbeeea100befbeeaeedadaad99befbeeea99befbeeea99befbeeaeedadaad98befbeeea2befbeeea2befbeeaeedadaad1befbeeea1befbeeea1befbeeaedadaadEbefbeeea diff --git a/tools/regression/usr.bin/tr/regress.in b/tools/regression/usr.bin/tr/regress.in new file mode 100644 index 0000000..5252b48 --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.in @@ -0,0 +1,4 @@ +quick brown +fox jumped +over the lazy +dog diff --git a/tools/regression/usr.bin/tr/regress.sh b/tools/regression/usr.bin/tr/regress.sh new file mode 100644 index 0000000..c448b6d --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.sh @@ -0,0 +1,20 @@ +# $FreeBSD$ + +echo 1..12 + +REGRESSION_START($1) + +REGRESSION_TEST(`00', `tr abcde 12345 < regress.in') +REGRESSION_TEST(`01', `tr 12345 abcde < regress.in') +REGRESSION_TEST(`02', `tr -d aceg < regress.in') +REGRESSION_TEST(`03', `tr "[[:lower:]]" "[[:upper:]]" < regress.in') +REGRESSION_TEST(`04', `tr "[[:alpha:]]" . < regress.in') +REGRESSION_TEST(`05', `tr "[[:lower:]]" "[[:upper:]]" < regress.in | tr "[[:upper:]]" "[[:lower:]]"') +REGRESSION_TEST(`06', `tr "[[:digit:]]" "?" < regress2.in') +REGRESSION_TEST(`07', `tr "[[:alnum:]]" "#" < regress2.in') +REGRESSION_TEST(`08', `tr "[[:upper:]]" "[[:lower:]]" < 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:]]" < regress2.in ; echo)') + +REGRESSION_END() diff --git a/tools/regression/usr.bin/tr/regress.t b/tools/regression/usr.bin/tr/regress.t new file mode 100644 index 0000000..a82aacd --- /dev/null +++ b/tools/regression/usr.bin/tr/regress.t @@ -0,0 +1,6 @@ +#!/bin/sh +# $FreeBSD$ + +cd `dirname $0` + +m4 ../regress.m4 regress.sh | sh diff --git a/tools/regression/usr.bin/tr/regress2.in b/tools/regression/usr.bin/tr/regress2.in new file mode 100644 index 0000000..c416463 --- /dev/null +++ b/tools/regression/usr.bin/tr/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!!! |