diff options
author | Denis Vlasenko | 2006-12-27 04:35:09 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-12-27 04:35:09 +0000 |
commit | 7b76233290bd9dead1848f28ed6d0edfcceb8e09 (patch) | |
tree | b963999fc54eddb65f1929b894f868e24851fc9c /testsuite/tr | |
download | busybox-1_3_0.zip busybox-1_3_0.tar.gz |
Correcting tag name to be like previous ones1_3_0
Diffstat (limited to 'testsuite/tr')
-rw-r--r-- | testsuite/tr/tr-d-works | 4 | ||||
-rw-r--r-- | testsuite/tr/tr-non-gnu | 1 | ||||
-rw-r--r-- | testsuite/tr/tr-works | 24 |
3 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/tr/tr-d-works b/testsuite/tr/tr-d-works new file mode 100644 index 0000000..d939e8b --- /dev/null +++ b/testsuite/tr/tr-d-works @@ -0,0 +1,4 @@ +echo testing | tr -d aeiou > logfile.gnu +echo testing | busybox tr -d aeiou > logfile.bb + +cmp logfile.gnu logfile.bb diff --git a/testsuite/tr/tr-non-gnu b/testsuite/tr/tr-non-gnu new file mode 100644 index 0000000..ffa6951 --- /dev/null +++ b/testsuite/tr/tr-non-gnu @@ -0,0 +1 @@ +echo fdhrnzvfu bffvsentr | busybox tr '[a-z]' '[n-z][a-m]' diff --git a/testsuite/tr/tr-works b/testsuite/tr/tr-works new file mode 100644 index 0000000..9b2e90e --- /dev/null +++ b/testsuite/tr/tr-works @@ -0,0 +1,24 @@ +run_tr () +{ + echo -n "echo '$1' | tr '$2' '$3': " + echo "$1" | $bb tr "$2" "$3" + echo +} +tr_test () +{ + run_tr "cbaab" abc zyx + run_tr "TESTING A B C" '[A-Z]' '[a-z]' + run_tr "abc[]" "a[b" AXB + run_tr abc '[:alpha:]' A-ZA-Z + run_tr abc56 '[:alnum:]' A-ZA-Zxxxxxxxxxx + run_tr 012 '[:digit:]' abcdefghi + run_tr abc56 '[:lower:]' '[:upper:]' + run_tr " " '[:space:]' 12345 + run_tr " " '[:blank:]' 12 + run_tr 'a b' '[= =]' X + run_tr "[:" '[:' ab +} + +bb= tr_test > logfile.gnu +bb=busybox tr_test > logfile.bb +cmp logfile.gnu logfile.bb |