From 7b76233290bd9dead1848f28ed6d0edfcceb8e09 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 27 Dec 2006 04:35:09 +0000 Subject: Correcting tag name to be like previous ones --- testsuite/tr/tr-works | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 testsuite/tr/tr-works (limited to 'testsuite/tr/tr-works') 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 -- cgit v1.1