2024-04-12 10:19:32 +00:00
|
|
|
#RUN: %fish -C 'set -g fish %fish' %s
|
2023-08-20 13:02:54 +00:00
|
|
|
|
|
|
|
if command -q getconf
|
2024-01-27 17:42:26 +00:00
|
|
|
# (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'
|
2023-08-20 13:02:54 +00:00
|
|
|
else
|
|
|
|
# this is DEFAULT_PATH
|
2023-08-20 14:08:54 +00:00
|
|
|
# the first element (usually `/usr/local/bin`) depends on PREFIX set in CMake, so we ignore it
|
2024-01-27 17:42:26 +00:00
|
|
|
set -e PATH
|
|
|
|
$fish -c 'test "$PATH[2..]" = "/usr/bin:/bin"; and echo Success'
|
2023-08-20 13:02:54 +00:00
|
|
|
end
|
|
|
|
# CHECK: Success
|
2024-01-27 17:42:26 +00:00
|
|
|
|
|
|
|
# Note: $PATH is now busted, I suggest abandoning this file.
|