Add a new set of regression tests, for the tr(1) utility.
Approved by: das, dds
This commit is contained in:
parent
38281b6601
commit
841cbf48eb
|
@ -0,0 +1,4 @@
|
|||
# $FreeBSD$
|
||||
|
||||
all:
|
||||
@m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR}
|
|
@ -0,0 +1,4 @@
|
|||
qui3k 2rown
|
||||
fox jump54
|
||||
ov5r th5 l1zy
|
||||
4og
|
|
@ -0,0 +1,4 @@
|
|||
quick brown
|
||||
fox jumped
|
||||
over the lazy
|
||||
dog
|
|
@ -0,0 +1,4 @@
|
|||
quik brown
|
||||
fox jumpd
|
||||
ovr th lzy
|
||||
do
|
|
@ -0,0 +1,4 @@
|
|||
QUICK BROWN
|
||||
FOX JUMPED
|
||||
OVER THE LAZY
|
||||
DOG
|
|
@ -0,0 +1,4 @@
|
|||
..... .....
|
||||
... ......
|
||||
.... ... ....
|
||||
...
|
|
@ -0,0 +1,4 @@
|
|||
quick brown
|
||||
fox jumped
|
||||
over the lazy
|
||||
dog
|
|
@ -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!!!
|
|
@ -0,0 +1,9 @@
|
|||
### ####### ## #### ## ### ####, ### ####### ## ####.
|
||||
#### ### #### ### #### ## ###### - ## ####### ## #### ## ### ####.
|
||||
## ####### ## #### ## ### ####, ## ####### ## ####.
|
||||
#### ### #### ### #### ## ###### - ## ####### ## #### ## ### ####.
|
||||
...
|
||||
# ####### ## #### ## ### ####, # ####### ## ####!!!
|
||||
#### ### #### ### #### ## ###### - # ###### ## #### ## ### ####.
|
||||
# ###### ## #### ## ### ####, # ###### ## ####!!!
|
||||
#### ## #### ### #### ## ###### - ## #### ####### ## #### ## ### ####!!!
|
|
@ -0,0 +1,9 @@
|
|||
100,100.
|
||||
-99.
|
||||
99,99.
|
||||
-98.
|
||||
...
|
||||
2,2!!!
|
||||
-1.
|
||||
1,1!!!
|
||||
-!!!
|
|
@ -0,0 +1 @@
|
|||
?#
|
|
@ -0,0 +1 @@
|
|||
$?$$$$$$$$
|
|
@ -0,0 +1 @@
|
|||
100befbeeea100befbeeaeedadaad99befbeeea99befbeeea99befbeeaeedadaad98befbeeea2befbeeea2befbeeaeedadaad1befbeeea1befbeeea1befbeeaedadaadEbefbeeea
|
|
@ -0,0 +1,4 @@
|
|||
quick brown
|
||||
fox jumped
|
||||
over the lazy
|
||||
dog
|
|
@ -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()
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
cd `dirname $0`
|
||||
|
||||
m4 ../regress.m4 regress.sh | sh
|
|
@ -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!!!
|
Loading…
Reference in New Issue