mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
17 lines
306 B
Fish
17 lines
306 B
Fish
|
# See issue 5692
|
||
|
|
||
|
logmsg "Testing `$status` after empty functions and blocks"
|
||
|
|
||
|
function empty
|
||
|
end
|
||
|
|
||
|
# functions shouldn't preserve $status
|
||
|
|
||
|
false; empty; echo $status # 0
|
||
|
true; empty; echo $status # 0
|
||
|
|
||
|
# blocks should preserve $status
|
||
|
|
||
|
false; begin; end; echo $status # 1
|
||
|
true; begin; end; echo $status # 0
|