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