From 0f7eb7f2dec9deeef02ed7d36e547f6bd1a14c4d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 30 Jan 2020 17:54:04 -0600 Subject: Couple more tests and sh comment changes. (Mostly todo list tracking.) --- tests/sh.test | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests') 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