Results for builtin-cd.test.sh

statusdashbashmkshzshashosh
pass 242619242425
ok 115110
N-I 110010
BUG 204320
FAIL 000003
total282828282828
casedashbashmkshzshashoshdescription
0pass pass pass pass pass pass cd and $PWD
1BUG pass BUG pass BUG FAIL cd BAD/..
detailsdetailsdetailsdetails
2N-I pass pass pass N-I pass cd with 2 or more args - with strict_arg_parse
detailsdetails
3pass ok ok ok pass pass cd with 2 or more args is allowed (strict_arg_parse disabled)
detailsdetailsdetails
4BUG pass ok BUG BUG pass cd - without OLDPWD
detailsdetailsdetailsdetails
5pass pass BUG BUG pass pass $OLDPWD
detailsdetails
6pass pass pass pass pass pass pwd
7pass pass pass pass pass pass pwd after cd ..
8pass pass pass pass pass pass pwd with symlink and -P
9pass pass pass pass pass pass setting $PWD doesn't affect the value of 'pwd' builtin
10pass pass pass pass pass pass unset PWD; then pwd
11pass pass pass pass pass pass 'unset PWD; pwd' before any cd (tickles a rare corner case)
12pass pass pass pass pass pass lie about PWD; pwd before any cd
13pass pass ok pass pass pass remove pwd dir
details
14pass pass ok pass pass pass pwd in symlinked dir on shell initialization
details
15pass pass pass pass pass pass Test the current directory after 'cd ..' involving symlinks
16pass pass pass pass pass pass cd with no arguments
17ok pass ok pass ok pass cd to nonexistent dir
detailsdetailsdetails
18pass pass pass pass pass pass cd away from dir that was deleted
19pass pass pass pass pass pass cd permits double bare dash
20pass pass pass pass pass pass cd to symlink with -L and -P
21pass pass pass pass pass pass cd to relative path with -L and -P
22pass pass pass pass pass pass unset PWD; cd /tmp is allowed (regression)
23pass pass pass BUG pass FAIL CDPATH is respected
detailsdetails
24pass pass pass pass pass pass Change directory in non-shell parent process (make or Python)
25pass pass BUG pass pass pass What happens when inherited $PWD and current dir disagree?
details
26pass pass BUG pass pass FAIL Survey of getcwd() syscall
detailsdetails
27pass N-I pass pass pass pass chdir is a synonym for cd - busybox ash
details
142 passed, 9 OK, 3 not implemented, 11 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

dash1 cd BAD/..

stdout:
status=0
stderr:
mksh1 cd BAD/..

stdout:
status=0
stderr:
ash1 cd BAD/..

stdout:
status=0
stderr:
osh1 cd BAD/..

[osh stdout] Expected 'status=1\n' Got 'status=0\n'

stdout:
status=0
stderr:
dash2 cd with 2 or more args - with strict_arg_parse

stdout:
status=0
status=0
stderr:
dash: 1: shopt: not found
ash2 cd with 2 or more args - with strict_arg_parse

stdout:
status=0
status=0
stderr:
ash: shopt: not found
bash3 cd with 2 or more args is allowed (strict_arg_parse disabled)

stdout:
stderr: 
bash: line 2: cd: too many arguments
mksh3 cd with 2 or more args is allowed (strict_arg_parse disabled)

stdout:
stderr: 
mksh: <stdin>[2]: cd: bad substitution
zsh3 cd with 2 or more args is allowed (strict_arg_parse disabled)

stdout:
stderr: 
cd: string not in pwd: foo
dash4 cd - without OLDPWD

stdout:
status=0
stderr:
mksh4 cd - without OLDPWD

stdout:
status=2
stderr:
mksh: <stdin>[1]: cd: no OLDPWD
zsh4 cd - without OLDPWD

stdout:
status=0
stderr:
ash4 cd - without OLDPWD

stdout:
status=0
stderr:
mksh5 $OLDPWD

stdout:
old: /
/
stderr:
zsh5 $OLDPWD

stdout:
old: /
OLDPWD=/
stderr:
mksh13 remove pwd dir

stdout:
/tmp/oil-spec-test/pwd
status=0
status=1
stderr:
mksh: <stdin>[7]: pwd: can't determine current directory: No such file or directory
mksh14 pwd in symlinked dir on shell initialization

stdout:
target
target
stderr:
dash17 cd to nonexistent dir

stdout:
status=2
stderr:
dash: 1: cd: can't cd to /nonexistent/dir
mksh17 cd to nonexistent dir

stdout:
status=2
stderr:
mksh: <stdin>[1]: cd: /nonexistent/dir: No such file or directory
ash17 cd to nonexistent dir

stdout:
status=2
stderr:
ash: cd: line 1: can't cd to /nonexistent/dir: No such file or directory
zsh23 CDPATH is respected

stdout:
status=0
/tmp/spam/foo
stderr:
osh23 CDPATH is respected

[osh stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/uke/oil/_tmp/spec-tmp/builtin-cd.test.sh/23-osh\n'

stdout:
status=1
/home/uke/oil/_tmp/spec-tmp/builtin-cd.test.sh/23-osh
stderr:
  cd foo
     ^~~
[ stdin ]:5: cd '/home/uke/oil/_tmp/spec-tmp/builtin-cd.test.sh/23-osh/foo': No such file or directory
mksh25 What happens when inherited $PWD and current dir disagree?

stdout:
Python PWD = None
PWD = /tmp/osh-spec-cd/cpan/Encode
/tmp/osh-spec-cd/cpan/Encode
cd=0
PWD = /tmp/osh-spec-cd/cpan/Encode/Byte
/tmp/osh-spec-cd/cpan/Encode/Byte
stderr:
Python argv = ['mksh', '-c', '\necho "PWD = $PWD"; pwd\ncd Byte; echo cd=$?\necho "PWD = $PWD"; pwd\n']
mksh26 Survey of getcwd() syscall

stdout:
2 err.txt
stderr:
osh26 Survey of getcwd() syscall

[osh stdout] Expected '1 err.txt\n' Got '3 err.txt\n'

stdout:
3 err.txt
stderr:
bash27 chdir is a synonym for cd - busybox ash

stdout:
fail
stderr:
bash: line 1: chdir: command not found