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