mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
Shell: Add tests for '&&' and '||' parsing and evaluation
This commit is contained in:
parent
c4888f4b5f
commit
3b3e90714f
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue