mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-31 21:54:00 +08:00
Port empty functions test to littlecheck
This commit is contained in:
parent
a7f6fd22d4
commit
098fe86ebf
18
tests/checks/empty.fish
Normal file
18
tests/checks/empty.fish
Normal file
|
@ -0,0 +1,18 @@
|
|||
# RUN: %fish %s
|
||||
|
||||
# See issue 5692
|
||||
|
||||
function empty
|
||||
end
|
||||
|
||||
# functions should not preserve $status
|
||||
false; empty; echo $status
|
||||
# CHECK: 0
|
||||
true; empty; echo $status
|
||||
# CHECK: 0
|
||||
|
||||
# blocks should preserve $status
|
||||
false; begin; end; echo $status
|
||||
# CHECK: 1
|
||||
true; begin; end; echo $status
|
||||
# CHECK: 0
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
####################
|
||||
# Testing `0` after empty functions and blocks
|
|
@ -1,16 +0,0 @@
|
|||
# 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
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
####################
|
||||
# Testing `0` after empty functions and blocks
|
||||
0
|
||||
0
|
||||
1
|
||||
0
|
Loading…
Reference in New Issue
Block a user