mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
add testcase for cd without read permission
This commit is contained in:
parent
a148760963
commit
4eb0dd623d
1 changed files with 22 additions and 0 deletions
|
@ -271,3 +271,25 @@ end
|
|||
complete -C'cd .'
|
||||
# CHECK: ../
|
||||
# CHECK: ./
|
||||
|
||||
# Check that cd works with minimal permissions (issue #10432)
|
||||
begin
|
||||
set -l oldpwd (pwd)
|
||||
set -l tmp (mktemp -d)
|
||||
cd $tmp
|
||||
mkdir -p a/b/c
|
||||
chmod -r a
|
||||
|
||||
cd a; pwd
|
||||
# CHECK: {{.*}}/a
|
||||
|
||||
cd b
|
||||
pwd
|
||||
ls
|
||||
# CHECK: {{.*}}/a/b
|
||||
# CHECK: c
|
||||
|
||||
cd $oldpwd
|
||||
chmod -R +rx $tmp # we must be able to list the directory to delete its children
|
||||
rm -rf $tmp
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue