mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-28 07:31:14 -03:00
Remove use of env -u in tests
Not available on NetBSD. We can get by without.
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
#RUN: %fish -C 'set -g fish %fish' %s
|
||||
|
||||
if command -q getconf
|
||||
env -u PATH $fish -c 'test "$PATH" = "$('(command -s getconf)' PATH)"; and echo Success'
|
||||
# (no env -u, some systems don't support that)
|
||||
set -l getconf (command -s getconf)
|
||||
set -e PATH
|
||||
$fish -c 'test "$PATH" = "$('"$getconf"' PATH)"; and echo Success'
|
||||
else
|
||||
# this is DEFAULT_PATH
|
||||
# the first element (usually `/usr/local/bin`) depends on PREFIX set in CMake, so we ignore it
|
||||
env -u PATH $fish -c 'test "$PATH[2..]" = "/usr/bin:/bin"; and echo Success'
|
||||
set -e PATH
|
||||
$fish -c 'test "$PATH[2..]" = "/usr/bin:/bin"; and echo Success'
|
||||
end
|
||||
# CHECK: Success
|
||||
|
||||
# Note: $PATH is now busted, I suggest abandoning this file.
|
||||
|
||||
Reference in New Issue
Block a user