aboutsummaryrefslogtreecommitdiff
path: root/tests/sh.testcases
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-05-24 23:05:13 +0000
committerMark Whitley <markw@lineo.com>2001-05-24 23:05:13 +0000
commit4f6aea807b0cd411cbc6f9d3b79e8583d6bd532b (patch)
tree4ae91b6883dfdfd2dbe59ab924e6c9a27ef476c8 /tests/sh.testcases
parent8b7a0d807a3ec8cfcbc4e4cb3067237b438bae14 (diff)
downloadbusybox-4f6aea807b0cd411cbc6f9d3b79e8583d6bd532b.tar.gz
More shell / quoting testcases from Larry.
Diffstat (limited to 'tests/sh.testcases')
-rw-r--r--tests/sh.testcases23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/sh.testcases b/tests/sh.testcases
index 85d72a200..9b5c8da59 100644
--- a/tests/sh.testcases
+++ b/tests/sh.testcases
@@ -1,4 +1,19 @@
# try running this with bash, ksh, ash, and hush.
+
+# simple quoting rules.
+echo a b
+echo "a b"
+echo a "" b
+echo a '' b
+echo hello?
+echo "hello?"
+echo t* hello
+echo t\* hello
+
+# quick and painless exit for lash
+if false; then true; exit; fi
+
+# fairly simple command substitution
echo `echo -e foo\\\necho bar`
echo THIS IS A TEST >foo
@@ -13,7 +28,13 @@ if false; then tr 'A-Z' 'a-z'; else echo bar4; fi <foo
if true || false; then echo foo; else echo bar5; fi
if true && false; then echo bar6; else echo foo; fi
-# ash, lash, and hush do not create fish; bash and ksh do. Tough.
+# fairly simple example of hush expanding variables too early
+unset TMP
+rm -f fish
+TMP=fish && >$TMP
+ls fish
+
+# ash, lash, and hush do not create fish; bash and ksh do.
# Thanks to Tapani Tarvainen <tt@mit.jyu.fi> for this stress test.
unset TMP
rm -f fish