mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +00:00
Test copying local-exported vars
This commit is contained in:
parent
9ca6cb9fc8
commit
f2a6ae20e5
2 changed files with 13 additions and 0 deletions
|
@ -247,6 +247,16 @@ __fish_test_shadow
|
||||||
# Test that the variable is still exported (#2611)
|
# Test that the variable is still exported (#2611)
|
||||||
env | string match '__fish_test_env17=*'
|
env | string match '__fish_test_env17=*'
|
||||||
|
|
||||||
|
# Test that local exported variables are copied to functions (#1091)
|
||||||
|
function __fish_test_local_export
|
||||||
|
echo $var
|
||||||
|
set var boo
|
||||||
|
echo $var
|
||||||
|
end
|
||||||
|
set -lx var wuwuwu
|
||||||
|
__fish_test_local_export
|
||||||
|
echo $var
|
||||||
|
|
||||||
# clear for other shells
|
# clear for other shells
|
||||||
set -eU __fish_test_universal_variables_variable_foo
|
set -eU __fish_test_universal_variables_variable_foo
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ Test 16 pass
|
||||||
__fish_test_env17=UNSHADOWED
|
__fish_test_env17=UNSHADOWED
|
||||||
SHADOWED
|
SHADOWED
|
||||||
__fish_test_env17=UNSHADOWED
|
__fish_test_env17=UNSHADOWED
|
||||||
|
wuwuwu
|
||||||
|
boo
|
||||||
|
wuwuwu
|
||||||
Testing Universal Startup
|
Testing Universal Startup
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
|
|
Loading…
Reference in a new issue