mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-02 07:53:43 +08:00
10 lines
474 B
Fish
10 lines
474 B
Fish
|
logmsg cd symlink non-resolution
|
||
|
set real (mktemp -d)
|
||
|
set link (mktemp -u)
|
||
|
ln -s $real $link
|
||
|
cd $link
|
||
|
test "$PWD" = "$link" || echo "\$PWD != \$link:"\n "\$PWD: $PWD"\n "\$link: $link"\n
|
||
|
test (pwd) = "$link" || echo "(pwd) != \$link:"\n "\$PWD: "(pwd)\n "\$link: $link"\n
|
||
|
test (pwd -P) = "$real" || echo "(pwd -P) != \$real:"\n "\$PWD: $PWD"\n "\$real: $real"\n
|
||
|
test (pwd -P -L) = "$link" || echo "(pwd -P -L) != \$link:"\n "\$PWD: $PWD"\n "\$link: $link"\n
|