summaryrefslogtreecommitdiff
path: root/i/pc104/initrd/conf/busybox/testsuite/tr/tr-works
diff options
context:
space:
mode:
authorjutteau2007-05-11 18:10:19 +0000
committerjutteau2007-05-11 18:10:19 +0000
commit5e1a84ab74d5e97582427f016f291a8c11e66f99 (patch)
treeddae3f36a21e7fa7c97145f4a49edcfe50063aa3 /i/pc104/initrd/conf/busybox/testsuite/tr/tr-works
parentb95709754c870cbb793266ce8e605a81d01a4f75 (diff)
Completion du script de mise à jour de la pc-104 :
* Ajout des sources de busybox dans ./conf/busybox/ * Ajout d'un fichier réclamé par les script dans ./conf/busybox.links
Diffstat (limited to 'i/pc104/initrd/conf/busybox/testsuite/tr/tr-works')
-rw-r--r--i/pc104/initrd/conf/busybox/testsuite/tr/tr-works24
1 files changed, 24 insertions, 0 deletions
diff --git a/i/pc104/initrd/conf/busybox/testsuite/tr/tr-works b/i/pc104/initrd/conf/busybox/testsuite/tr/tr-works
new file mode 100644
index 0000000..9b2e90e
--- /dev/null
+++ b/i/pc104/initrd/conf/busybox/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