diff options
author | Rob Landley <rob@landley.net> | 2020-01-30 17:54:04 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-01-30 17:54:04 -0600 |
commit | 0f7eb7f2dec9deeef02ed7d36e547f6bd1a14c4d (patch) | |
tree | cc92108ea38f405b45868954c128f8bc094b6719 /tests | |
parent | c3fe030e31b2da9104cdd62cac3fa31509cb83a8 (diff) | |
download | toybox-0f7eb7f2dec9deeef02ed7d36e547f6bd1a14c4d.tar.gz |
Couple more tests and sh comment changes. (Mostly todo list tracking.)
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/sh.test | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/sh.test b/tests/sh.test index e182a491..ba469e49 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -9,7 +9,9 @@ [ -z "$SH" ] && { [ -z "$TEST_HOST" ] && SH="sh" || export SH="bash" ; } export EVAL="$SH -c" -testing "" "echo hello" "hello\n" "" "" +testing "smoketest" "echo hello" "hello\n" "" "" + +# ; | && || testing "semicolon" "echo one;echo two" "one\ntwo\n" "" "" testing "simple pipe" "echo hello | cat" "hello\n" "" "" testing "&&" "true && echo hello" "hello\n" "" "" @@ -18,6 +20,14 @@ testing "||" "true || echo hello" "" "" "" testing "||2" "false || echo hello" "hello\n" "" "" testing "&& ||" "true && false && potato || echo hello" "hello\n" "" "" +# redirection + +testing "" "cat < input" "hello\n" "hello\n" "" +testing "" "echo blah >out; cat out" "blah\n" "" "" +testing "" "touch /not/exist 2>out||grep -o /not/exist out" "/not/exist\n" "" "" +#testing "" 'echo hello | (read i <input; echo $i; read i; echo $i)' \ +# "there\nhello\n" "there\n" "" + testing "tilde expansion" "echo ~" "$HOME\n" "" "" testing "tilde2" "echo ~/dir" "$HOME/dir\n" "" "" testing "bracket expansion" \ |