mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-31 18:08:29 +08:00
Test: validate $status is preserved on calling into a function
This commit is contained in:
parent
ab37dfaf78
commit
47a61a3202
|
@ -7,3 +7,6 @@ status: Invalid job control mode '1none'
|
|||
|
||||
####################
|
||||
# Future Feature Flags
|
||||
|
||||
####################
|
||||
# Ensure $status isn't reset before a function is executed
|
||||
|
|
|
@ -48,3 +48,10 @@ logmsg Future Feature Flags
|
|||
status features
|
||||
status test-feature stderr-nocaret ; echo $status
|
||||
status test-feature not-a-feature ; echo $status
|
||||
|
||||
logmsg 'Ensure $status isn\'t reset before a function is executed'
|
||||
function echo_last
|
||||
echo $status
|
||||
end
|
||||
|
||||
false; echo_last; echo $status #1
|
||||
|
|
|
@ -9,3 +9,8 @@ qmark-noglob off 3.0 ? no longer globs
|
|||
string-replace-fewer-backslashes off 3.1 string replace -r needs fewer backslashes in the replacement
|
||||
1
|
||||
2
|
||||
|
||||
####################
|
||||
# Ensure $status isn't reset before a function is executed
|
||||
1
|
||||
0
|
||||
|
|
Loading…
Reference in New Issue
Block a user