mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 23:11:14 -03:00
fix cd symlink resolution tests on Cygwin
This commit is contained in:
@@ -55,19 +55,21 @@ else
|
||||
end
|
||||
# CHECKERR: pwd: realpath failed: {{.+}}
|
||||
|
||||
mkdir $real/subdir
|
||||
cd $link
|
||||
test "$PWD" = "$link" || echo "Default cd should keep symlink:"\n "\$PWD: $PWD"\n "\$link: $link"\n
|
||||
cd -P $link
|
||||
test "$PWD" = "$real" || echo "cd -P should resolve symlink:"\n "\$PWD: $PWD"\n "\$real: $real"\n
|
||||
cd $link/subdir
|
||||
test "$PWD" = "$link/subdir" || echo "Logical cd should keep subdir symlink:"\n "\$PWD: $PWD"\n "\$link/subdir: $link/subdir"\n
|
||||
cd -P ..
|
||||
test "$PWD" = "$real" || echo "cd -P .. should use physical parent:"\n "\$PWD: $PWD"\n "\$real: $real"\n
|
||||
cd $link/subdir
|
||||
cd -L ..
|
||||
test "$PWD" = "$link" || echo "cd -L .. should use logical parent:"\n "\$PWD: $PWD"\n "\$link: $link"\n
|
||||
cd $base
|
||||
if not set -q nosymlinks
|
||||
mkdir $real/subdir
|
||||
cd $link
|
||||
test "$PWD" = "$link" || echo "Default cd should keep symlink:"\n "\$PWD: $PWD"\n "\$link: $link"\n
|
||||
cd -P $link
|
||||
test "$PWD" = "$real" || echo "cd -P should resolve symlink:"\n "\$PWD: $PWD"\n "\$real: $real"\n
|
||||
cd $link/subdir
|
||||
test "$PWD" = "$link/subdir" || echo "Logical cd should keep subdir symlink:"\n "\$PWD: $PWD"\n "\$link/subdir: $link/subdir"\n
|
||||
cd -P ..
|
||||
test "$PWD" = "$real" || echo "cd -P .. should use physical parent:"\n "\$PWD: $PWD"\n "\$real: $real"\n
|
||||
cd $link/subdir
|
||||
cd -L ..
|
||||
test "$PWD" = "$link" || echo "cd -L .. should use logical parent:"\n "\$PWD: $PWD"\n "\$link: $link"\n
|
||||
cd $base
|
||||
end
|
||||
|
||||
# Create a symlink and verify logical completion.
|
||||
# create directory $base/through/the/looking/glass
|
||||
|
||||
Reference in New Issue
Block a user