diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-07-28 06:31:27 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-30 18:47:41 +0200 |
commit | 3b3e90714f4171d88c983dfe55c581d6265215e4 (patch) | |
tree | d0c8d4f8674b171e48d25497e7a358e9a32e063f /Shell/Tests | |
parent | c4888f4b5f9a3148cd80ec764cd1dd4457dd9d50 (diff) | |
download | serenity-3b3e90714f4171d88c983dfe55c581d6265215e4.zip |
Shell: Add tests for '&&' and '||' parsing and evaluation
Diffstat (limited to 'Shell/Tests')
-rw-r--r-- | Shell/Tests/valid.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Shell/Tests/valid.sh b/Shell/Tests/valid.sh index 4676aaee54..27f02bc128 100644 --- a/Shell/Tests/valid.sh +++ b/Shell/Tests/valid.sh @@ -5,6 +5,13 @@ true || exit 2 false && exit 2 +# Can we chain &&'s? +false && exit 2 && echo "can't chain &&'s" && exit 2 + +# Proper precedence between &&'s and ||'s +false && exit 2 || true && false && exit 2 + + # Sanity check: can we pass arguments to 'test'? test yes = yes || exit 2 |