mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
parent
8c707a4e2f
commit
0a6f62358b
2 changed files with 16 additions and 0 deletions
|
@ -27,3 +27,15 @@ echo $test[1..(count $test)]
|
||||||
# See issue 1061
|
# See issue 1061
|
||||||
echo "Verify that if statements swallow failure"
|
echo "Verify that if statements swallow failure"
|
||||||
if false ; end ; echo $status
|
if false ; end ; echo $status
|
||||||
|
|
||||||
|
# Verify and/or behavior with if and while statements
|
||||||
|
if false ; or true ; echo "success1" ; end
|
||||||
|
if false ; and false ; echo "failure1" ; end
|
||||||
|
while false ; and false ; or true ; echo "success2"; break ; end
|
||||||
|
while false; or begin ; false; or true; end; echo "success3"; end
|
||||||
|
if false ; else if false ; and true ; else if false ; and false ; else if false; or true; echo "success 4"; end
|
||||||
|
if false ; else if false ; and true ; else if false ; or false ; else if false; echo "failure 4"; end
|
||||||
|
if false ; or true | false ; echo "failure5" ; end
|
||||||
|
|
||||||
|
# Catch this corner case, which should produce an error
|
||||||
|
if false ; or --help ; end
|
||||||
|
|
|
@ -17,3 +17,7 @@ Test more
|
||||||
1 2 3 4 5 6 7 8 9 10
|
1 2 3 4 5 6 7 8 9 10
|
||||||
Verify that if statements swallow failure
|
Verify that if statements swallow failure
|
||||||
0
|
0
|
||||||
|
success1
|
||||||
|
success2
|
||||||
|
success3
|
||||||
|
success4
|
||||||
|
|
Loading…
Reference in a new issue