diff options
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/realpath | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/misc/realpath b/tests/misc/realpath index fb0139367..8a1f336cd 100755 --- a/tests/misc/realpath +++ b/tests/misc/realpath @@ -41,13 +41,18 @@ realpath -m '' && fail=1 # symlink resolution this=$(realpath .) -test "$(realpath $relative ldir2/..)" = "$this/dir1" || fail=1 -test "$(realpath -L $relative ldir2/..)" = "$this" || fail=1 -test "$(realpath -s $relative ldir2)" = "$this/ldir2" || fail=1 +test "$(realpath ldir2/..)" = "$this/dir1" || fail=1 +test "$(realpath -L ldir2/..)" = "$this" || fail=1 +test "$(realpath -s ldir2)" = "$this/ldir2" || fail=1 # relative string handling test $(realpath -m --relative-to=prefix prefixed/1) = '../prefixed/1' || fail=1 test $(realpath -m --relative-to=prefixed prefix/1) = '../prefix/1' || fail=1 test $(realpath -m --relative-to=prefixed prefixed/1) = '1' || fail=1 +# Ensure no redundant trailing '/' present, as was the case in v8.15 +test $(realpath -sm --relative-to=/usr /) = '..' || fail=1 +# Ensure no redundant leading '../' present, as was the case in v8.15 +test $(realpath -sm --relative-to=/ /usr) = 'usr' || fail=1 + Exit $fail |