Correct a realpath test

This used the *logical* $PWD, but realpath would operate on the
physical $PWD if given ".", even with -s. This makes this test fail if the $PWD is
logically different from physical.
This commit is contained in:
Fabian Homborg 2021-08-29 23:10:50 +02:00
parent 0bcf5ac88d
commit d62e22dcc0

View File

@ -73,7 +73,7 @@ else
end
set -l real_path (builtin realpath -s .)
set -l expected_real_path (pwd) # Logical working directory.
set -l expected_real_path (pwd -P) # Physical working directory.
if test "$real_path" = "$expected_real_path"
echo "relative path correctly handled"
# CHECK: relative path correctly handled