xref: /freebsd/usr.bin/tr/tests/regress.sh (revision 123af6ec70016f5556da5972d4d63c7d175c06d3)
1# $FreeBSD$
2
3echo 1..14
4
5REGRESSION_START($1)
6
7REGRESSION_TEST(`00', `tr abcde 12345 <${SRCDIR}/regress.in')
8REGRESSION_TEST(`01', `tr 12345 abcde <${SRCDIR}/regress.in')
9REGRESSION_TEST(`02', `tr -d aceg <${SRCDIR}/regress.in')
10REGRESSION_TEST(`03', `tr "[[:lower:]]" "[[:upper:]]" <${SRCDIR}/regress.in')
11REGRESSION_TEST(`04', `tr "[[:alpha:]]" . <${SRCDIR}/regress.in')
12REGRESSION_TEST(`05', `tr "[[:lower:]]" "[[:upper:]]" <${SRCDIR}/regress.in | tr "[[:upper:]]" "[[:lower:]]"')
13REGRESSION_TEST(`06', `tr "[[:digit:]]" "?" <${SRCDIR}/regress2.in')
14REGRESSION_TEST(`07', `tr "[[:alnum:]]" "#" <${SRCDIR}/regress2.in')
15REGRESSION_TEST(`08', `tr "[[:upper:]]" "[[:lower:]]" <${SRCDIR}/regress2.in | tr -d "[^[:alpha:]] "')
16REGRESSION_TEST(`09', `printf "\\f\\r\\n" | tr "\\014\\r" "?#"')
17REGRESSION_TEST(`0a', `printf "0xdeadbeef\\n" | tr "x[[:xdigit:]]" "?\$"')
18REGRESSION_TEST(`0b', `(tr -cd "[[:xdigit:]]" <${SRCDIR}/regress2.in ; echo)')
19REGRESSION_TEST(`0c', `echo "[[[[]]]]" | tr -d "[=]=]"')
20REGRESSION_TEST(`0d', `echo "]=[" | tr -d "[=]"')
21
22REGRESSION_END()
23