fish-shell/tests/test3.out
ridiculousfish ea407476d0 Correctly un-export an env var when it is shadowed
Prior to this fix, if you exported a variable in one scope
and then unexported it in the next, it would remain exported.
Example:

    set -gx VAR 1
    function foo; set -l VAR; env; end
    foo

Here 'VAR' would be exported to 'env' because we failed to
notice that the env var is shadowed by an unexported variable.
This occurred at env var computation time, not in env_set!

Fixes #2132
2015-06-12 16:11:45 -07:00

37 lines
457 B
Text

Test 1 pass
Test 2 pass
Test 3 pass
Test 4 pass
Test 5 pass
Test 6 pass
Test 7 pass
Test 8 pass
Test 9 pass
Test 10 pass
Test 11 pass
Test 12 pass
Test 13 pass
Test 14 pass
Test 15 pass
Foo change detected
Foo change detected
Test 16 pass
__fish_test_env17=UNSHADOWED
SHADOWED
Testing Universal Startup
1
1
2
2
Missing:
Missing:
SHLVL: 1
SHLVL: 2
SHLVL: 1
SHLVL: 1
SHLVL: 1
SHLVL: 4
SHLVL: 4
Elements in DISPLAY: 1
Elements in FOO: 4
MANPATH=man1:man2:man3