fish-shell/tests/checks
Johannes Altmanninger b7f35f949e Do not import vars that are equivalent to a universal exported var
Universal exported variables (created by `set -xU`) used to show up
both as universal and global variable in child instances of fish.

As a result, when changing an exported universal variable, the
new value would only be visible after a new login (or deleting the
variable from global scope in each fish instance).

Additionally, something like `set -xU EDITOR vim -g` would be imported
into the global scope as a single word resulting in failures to
execute $EDITOR in fish.

We cannot simply give precedence to universal variables, because
another process might have exported the same variable.  Instead, we
only skip importing a variable when it is equivalent to an exported
universal variable with the same name.  We compare their values after
joining with spaces, hence skipping those imports does not change the
environment fish passes to its children. Only the representation in
fish is changed from `"vim -g"` to `vim -g`.

Closes #5258.
This eliminates the issue #5348 for universal variables.
2019-10-19 12:41:57 +02:00
..
broken-config/fish Port config tests to littlecheck 2019-06-25 22:31:06 +02:00
abbr.fish Unexpand abbreviations' variable names before completing them 2019-10-06 14:42:42 +02:00
alias.fish Port alias test to littlecheck 2019-06-26 21:19:40 +02:00
andandoror.fish Correctly implement and --help and or --help 2019-09-08 10:42:24 -07:00
argparse.fish builtins: Use standard builtin.h error macros more 2019-09-17 22:04:33 -07:00
bad-option.fish Add NetBSD's error to the bad-option test 2019-07-02 23:48:25 +02:00
bind.fish Port bind tests to littlecheck 2019-06-26 21:19:40 +02:00
broken-config.fish Port config tests to littlecheck 2019-06-25 22:31:06 +02:00
cd.fish Always return absolute path in path_get_cdpath 2019-10-19 12:38:17 +02:00
command-1.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
command-2.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
command-vars-persist.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
complete.fish Completion: complete argument to last of a group of short options 2019-10-16 11:30:50 +02:00
count.fish Port count test to littlecheck 2019-06-26 21:19:40 +02:00
directory-redirect.fish tests: Simplify directory-redirect test 2019-06-28 20:48:11 +02:00
env.fish Correctly mark a node when erasing an exported variable 2019-06-28 11:22:49 -07:00
eval.fish eval tests: Fix path 2019-07-03 15:14:49 +02:00
expansion.fish Fix caret position of invalid expansion in command position 2019-10-06 13:43:05 -07:00
features-nocaret1.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
features-nocaret2.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
features-nocaret3.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
features-nocaret4.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
features-qmark1.fish Port qmark1 test to littlecheck 2019-06-25 22:31:06 +02:00
features-qmark2.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
features-string-backslashes-off.fish tests, CHANGELOG: regex-easyesc 2019-08-13 22:56:31 -07:00
features-string-backslashes.fish tests, CHANGELOG: regex-easyesc 2019-08-13 22:56:31 -07:00
function.fish Fix options after --argument-names to function (#6188) 2019-10-10 18:09:26 +02:00
init-command-2.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
init-command-mix-ordering.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
init-command-mix.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
init-command.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
interactive.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
invocation.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
login-interactive.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
login.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
math.fish builtins: Use standard builtin.h error macros more 2019-09-17 22:04:33 -07:00
no-login-no-interactive.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
printf.fish Port printf tests to littlecheck and teach the tester how to run it 2019-06-16 14:10:41 -07:00
rc-returned.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
realpath.fish Port realpath tests to littlecheck 2019-07-02 23:05:50 +02:00
set.fish Do not import vars that are equivalent to a universal exported var 2019-10-19 12:41:57 +02:00
setenv.fish Port setenv tests to littlecheck 2019-07-09 10:02:50 -07:00
sigint.fish Add a simple test for SIGINT out of loops 2019-10-15 22:33:53 -07:00
signal.fish Port signal tests to littlecheck 2019-06-26 11:07:46 -07:00
string.fish builtins: Use standard builtin.h error macros more 2019-09-17 22:04:33 -07:00
switch.fish Allow switch with something that expands to nothing 2019-07-31 14:08:28 +02:00
version.fish Port most of the invocation tests to littlecheck 2019-06-25 20:56:29 +02:00
wraps.fish Raise the recursion limit of complete 2019-10-03 21:25:19 +02:00