From bd5d79783f5be594aa6f4a28ae1368c6af3a3530 Mon Sep 17 00:00:00 2001 From: markw Date: Thu, 24 May 2001 23:05:13 +0000 Subject: More shell / quoting testcases from Larry. git-svn-id: svn://busybox.net/trunk/busybox@2725 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- tests/sh.testcases | 23 ++++++++++++++++++++++- tests/testcases | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) (limited to 'tests') 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 $TMP +ls fish + +# ash, lash, and hush do not create fish; bash and ksh do. # Thanks to Tapani Tarvainen for this stress test. unset TMP rm -f fish diff --git a/tests/testcases b/tests/testcases index 64d406a8a..5043c309e 100644 --- a/tests/testcases +++ b/tests/testcases @@ -306,7 +306,7 @@ sed -e '/test/s/dangerous/PELIGROSO/' testcases sh -c "echo a b c" sh -c ">" sh -c "a" -#sh sh.testcases +sh sh.testcases # sleep - can't test: produces no output -- cgit v1.2.3-55-g6feb