mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
Add test that confirms behavior when PATH is unset
This commit is contained in:
parent
6283274c24
commit
3a4149a9e7
1 changed files with 11 additions and 0 deletions
11
tests/checks/default-setup-path.fish
Normal file
11
tests/checks/default-setup-path.fish
Normal file
|
@ -0,0 +1,11 @@
|
|||
#RUN: %fish -C 'set -g fish %fish' %s
|
||||
|
||||
# FIXME: Rationalize behavior when PATH is explicitly unset, should this not behave like PATH=""?
|
||||
# "" is threated like ".", see https://github.com/fish-shell/fish-shell/issues/3914
|
||||
if command -q getconf
|
||||
env -u PATH $fish -c 'test "$PATH" = "$('(command -s getconf)' PATH)"; and echo Success'
|
||||
else
|
||||
# this is DEFAULT_PATH
|
||||
env -u PATH $fish -c 'test "$PATH" = "/usr/bin:/bin"; and echo Success'
|
||||
end
|
||||
# CHECK: Success
|
Loading…
Reference in a new issue