| status | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | |
| pass | 26 | 24 | 24 | 24 | 19 | 19 | 14 | 17 | 23 | 25 | |
| ok | 1 | 1 | 1 | 1 | 5 | 0 | 0 | 0 | 0 | 0 | |
| N-I | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
| BUG | 0 | 2 | 2 | 3 | 4 | 0 | 0 | 0 | 0 | 0 | |
| FAIL | 0 | 0 | 0 | 0 | 0 | 9 | 14 | 11 | 5 | 3 | |
| total | 28 | 28 | 28 | 28 | 28 | 28 | 28 | 28 | 28 | 28 | |
| case | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | description |
| 0 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | cd and $PWD |
| 1 | pass | BUG | BUG | pass | BUG | FAIL | FAIL | FAIL | pass | FAIL | cd BAD/.. |
| details | details | details | details | details | details | details | |||||
| 2 | pass | N-I | N-I | pass | pass | pass | pass | pass | FAIL | pass | cd with 2 or more args - with strict_arg_parse |
| details | details | details | |||||||||
| 3 | ok | pass | pass | ok | ok | FAIL | FAIL | FAIL | pass | pass | cd with 2 or more args is allowed (strict_arg_parse disabled) |
| details | details | details | details | details | details | ||||||
| 4 | pass | BUG | BUG | BUG | ok | FAIL | pass | FAIL | pass | pass | cd - without OLDPWD |
| details | details | details | details | details | details | ||||||
| 5 | pass | pass | pass | BUG | BUG | FAIL | FAIL | FAIL | pass | pass | $OLDPWD |
| details | details | details | details | details | |||||||
| 6 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pwd |
| 7 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pwd after cd .. |
| 8 | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | pass | pwd with symlink and -P |
| details | |||||||||||
| 9 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | setting $PWD doesn't affect the value of 'pwd' builtin |
| 10 | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | pass | unset PWD; then pwd |
| details | |||||||||||
| 11 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | 'unset PWD; pwd' before any cd (tickles a rare corner case) |
| 12 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | lie about PWD; pwd before any cd |
| 13 | pass | pass | pass | pass | ok | FAIL | FAIL | pass | pass | pass | remove pwd dir |
| details | details | details | |||||||||
| 14 | pass | pass | pass | pass | ok | FAIL | FAIL | FAIL | FAIL | pass | pwd in symlinked dir on shell initialization |
| details | details | details | details | details | |||||||
| 15 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Test the current directory after 'cd ..' involving symlinks |
| 16 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | cd with no arguments |
| 17 | pass | ok | ok | pass | ok | FAIL | pass | pass | pass | pass | cd to nonexistent dir |
| details | details | details | details | ||||||||
| 18 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | cd away from dir that was deleted |
| 19 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | cd permits double bare dash |
| 20 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | pass | pass | cd to symlink with -L and -P |
| details | details | ||||||||||
| 21 | pass | pass | pass | pass | pass | pass | FAIL | FAIL | pass | pass | cd to relative path with -L and -P |
| details | details | ||||||||||
| 22 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | unset PWD; cd /tmp is allowed (regression) |
| 23 | pass | pass | pass | BUG | pass | pass | FAIL | FAIL | FAIL | FAIL | CDPATH is respected |
| details | details | details | details | details | |||||||
| 24 | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | pass | Change directory in non-shell parent process (make or Python) |
| details | |||||||||||
| 25 | pass | pass | pass | pass | BUG | FAIL | FAIL | FAIL | pass | pass | What happens when inherited $PWD and current dir disagree? |
| details | details | details | details | ||||||||
| 26 | pass | pass | pass | pass | BUG | FAIL | FAIL | FAIL | FAIL | FAIL | Survey of getcwd() syscall |
| details | details | details | details | details | details | ||||||
| 27 | N-I | pass | pass | pass | pass | pass | FAIL | FAIL | FAIL | pass | chdir is a synonym for cd - busybox ash |
| details | details | details | details |
215 passed, 9 OK, 3 not implemented, 11 BUG, 42 failed, 0 timeouts, 0 cases skipped 3 failed under osh
| dash | 1 cd BAD/.. stdout: status=0stderr: |
| ash | 1 cd BAD/.. stdout: status=0stderr: |
| mksh | 1 cd BAD/.. stdout: status=0stderr: |
| ksh | 1 cd BAD/.. [ksh stdout] Expected 'status=1\n' Got 'status=0\n' stdout: status=0stderr: |
| toysh | 1 cd BAD/.. [toysh stdout] Expected 'status=1\n' Got 'status=0\n' stdout: status=0stderr: |
| sush | 1 cd BAD/.. [sush stdout] Expected 'status=1\n' Got 'status=0\n' stdout: status=0stderr: |
| osh | 1 cd BAD/.. [osh stdout] Expected 'status=1\n' Got 'status=0\n' stdout: status=0stderr: |
| dash | 2 cd with 2 or more args - with strict_arg_parse stdout: status=0 status=0stderr: dash: 1: shopt: not found |
| ash | 2 cd with 2 or more args - with strict_arg_parse stdout: status=0 status=0stderr: ash: shopt: not found |
| brush | 2 cd with 2 or more args - with strict_arg_parse [brush stdout] Expected 'status=0\nstatus=0\nfailed with multiple args\n' Got 'status=0\nstatus=0\n' stdout: status=0 status=0stderr: shopt: strict_arg_parse: invalid shell option name error: unexpected argument 'bar' found Usage: cd [OPTIONS] [TARGET_DIR] For more information, try '--help'. |
| bash | 3 cd with 2 or more args is allowed (strict_arg_parse disabled) stdout: stderr: bash: line 2: cd: too many arguments |
| zsh | 3 cd with 2 or more args is allowed (strict_arg_parse disabled) stdout: stderr: cd: string not in pwd: foo |
| mksh | 3 cd with 2 or more args is allowed (strict_arg_parse disabled) stdout: stderr: mksh: <stdin>[2]: cd: bad substitution |
| ksh | 3 cd with 2 or more args is allowed (strict_arg_parse disabled) [ksh status] Expected 0 Got 2 stdout: stderr: E: ksh: <stdin>[2]: cd: bad substitution |
| toysh | 3 cd with 2 or more args is allowed (strict_arg_parse disabled) [toysh status] Expected 0 Got 1 stdout: stderr: cd: Max 1 argument (see "cd --help") |
| sush | 3 cd with 2 or more args is allowed (strict_arg_parse disabled) [sush status] Expected 0 Got 1 stdout: stderr: sush: cd: too many arguments |
| dash | 4 cd - without OLDPWD stdout: status=0stderr: |
| ash | 4 cd - without OLDPWD stdout: status=0stderr: |
| zsh | 4 cd - without OLDPWD stdout: status=0stderr: |
| mksh | 4 cd - without OLDPWD stdout: status=2stderr: mksh: <stdin>[1]: cd: no OLDPWD |
| ksh | 4 cd - without OLDPWD [ksh stdout] Expected 'status=1\n' Got 'status=2\n' stdout: status=2stderr: E: ksh: <stdin>[1]: cd: no OLDPWD |
| sush | 4 cd - without OLDPWD [sush stdout] Expected 'status=1\n' Got 'status=0\n' stdout: status=0stderr: |
| zsh | 5 $OLDPWD stdout: old: / OLDPWD=/stderr: |
| mksh | 5 $OLDPWD stdout: old: / /stderr: |
| ksh | 5 $OLDPWD [ksh stdout] Expected 'old: /\nOLDPWD=/\n/\n' Got 'old: /\n/\n' stdout: old: / /stderr: |
| toysh | 5 $OLDPWD [toysh stdout] Expected 'old: /\nOLDPWD=/\n/\n' Got 'old: /\nOLDPWD=/\n' stdout: old: / OLDPWD=/stderr: |
| sush | 5 $OLDPWD [sush stdout] Expected 'old: /\nOLDPWD=/\n/\n' Got 'old: /\n/\n' stdout: old: / /stderr: |
| toysh | 8 pwd with symlink and -P [toysh stdout] Expected 'pwd:\nsymlink\npwd -P:\ntarget\n' Got 'pwd:\ntarget\npwd -P:\ntarget\n' stdout: pwd: target pwd -P: targetstderr: |
| toysh | 10 unset PWD; then pwd [toysh status] Expected 0 Got -6 stdout: PWD= /tmp/oil-spec-test/pwd PWD=stderr: free(): double free detected in tcache 2 |
| mksh | 13 remove pwd dir stdout: /tmp/oil-spec-test/pwd status=0 status=1stderr: mksh: <stdin>[7]: pwd: can't determine current directory: No such file or directory |
| ksh | 13 remove pwd dir [ksh stdout] Expected '/tmp/oil-spec-test/pwd\nstatus=0\n/tmp/oil-spec-test/pwd\nstatus=0\n' Got '/tmp/oil-spec-test/pwd\nstatus=0\nstatus=1\n' stdout: /tmp/oil-spec-test/pwd status=0 status=1stderr: E: ksh: <stdin>[7]: pwd: can't determine current directory: No such file or directory |
| toysh | 13 remove pwd dir [toysh stdout] Expected '/tmp/oil-spec-test/pwd\nstatus=0\n/tmp/oil-spec-test/pwd\nstatus=0\n' Got '/tmp/oil-spec-test/pwd\nstatus=0\nstatus=1\n' stdout: /tmp/oil-spec-test/pwd status=0 status=1stderr: pwd: xgetcwd: No such file or directory |
| mksh | 14 pwd in symlinked dir on shell initialization stdout: target targetstderr: |
| ksh | 14 pwd in symlinked dir on shell initialization [ksh stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n' stdout: target targetstderr: |
| toysh | 14 pwd in symlinked dir on shell initialization [toysh stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n' [toysh stderr] Expected u'' Got 'free(): double free detected in tcache 2\n' [toysh status] Expected 0 Got -6 stdout: target targetstderr: free(): double free detected in tcache 2 |
| sush | 14 pwd in symlinked dir on shell initialization [sush stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n' stdout: target targetstderr: |
| brush | 14 pwd in symlinked dir on shell initialization [brush stdout] Expected 'symlink\ntarget\n' Got 'target\ntarget\n' stdout: target targetstderr: |
| dash | 17 cd to nonexistent dir stdout: status=2stderr: dash: 1: cd: can't cd to /nonexistent/dir |
| ash | 17 cd to nonexistent dir stdout: status=2stderr: ash: cd: line 1: can't cd to /nonexistent/dir: No such file or directory |
| mksh | 17 cd to nonexistent dir stdout: status=2stderr: mksh: <stdin>[1]: cd: /nonexistent/dir: No such file or directory |
| ksh | 17 cd to nonexistent dir [ksh stdout] Expected 'status=1\n' Got 'status=2\n' stdout: status=2stderr: E: ksh: <stdin>[1]: cd: /nonexistent/dir: No such file or directory |
| toysh | 20 cd to symlink with -L and -P [toysh stdout] Expected 'OK\nOK\nOK\n' Got 'OK\n' stdout: OKstderr: |
| sush | 20 cd to symlink with -L and -P [sush stdout] Expected 'OK\nOK\nOK\n' Got 'OK\nOK\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/20-sush/cd-symlink\n' stdout: OK OK /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/20-sush/cd-symlinkstderr: sush: cd: too many arguments sush: cd: too many arguments |
| toysh | 21 cd to relative path with -L and -P [toysh stdout] Expected 'OK\nOK\nOK\n' Got 'failed\n' [toysh status] Expected 0 Got 1 stdout: failedstderr: |
| sush | 21 cd to relative path with -L and -P [sush stdout] Expected 'OK\nOK\nOK\n' Got 'OK\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/21-sush/cd-symlink/subdir\n' stdout: OK /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/21-sush/cd-symlink/subdirstderr: sush: cd: too many arguments sush: cd: too many arguments |
| zsh | 23 CDPATH is respected stdout: status=0 /tmp/spam/foostderr: |
| toysh | 23 CDPATH is respected [toysh stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-toysh\n' stdout: status=1 /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-toyshstderr: cd: foo: No such file or directory |
| sush | 23 CDPATH is respected [sush stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-sush\n' stdout: status=1 /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-sushstderr: sush: cd: "/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-sush/foo": No such file or directory |
| brush | 23 CDPATH is respected [brush stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-brush\n' stdout: status=1 /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-brushstderr: [31merror:[39m cd: i/o error: No such file or directory (os error 2) |
| osh | 23 CDPATH is respected [osh stdout] Expected '/tmp/spam/foo\nstatus=0\n/tmp/spam/foo\n' Got 'status=1\n/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-osh\n' stdout: status=1 /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-oshstderr: cd foo
^~~
[ stdin ]:5: cd '/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/23-osh/foo': No such file or directory
|
| toysh | 24 Change directory in non-shell parent process (make or Python) [toysh stdout] Expected '/cpan/Encode/Byte\n' Got '\n' [toysh stderr] Found 'Traceback (most recent' stdout: stderr: set: bad --
Python PWD = '/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/24-toysh'
Python argv = ['']
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 185, in check_call
retcode = call(*popenargs, **kwargs)
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
|
| mksh | 25 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/Bytestderr: Python argv = ['mksh', '-c', '\necho "PWD = $PWD"; pwd\ncd Byte; echo cd=$?\necho "PWD = $PWD"; pwd\n'] |
| ksh | 25 What happens when inherited $PWD and current dir disagree? [ksh stdout] Expected "Python PWD = '/tmp/osh-spec-cd'\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n" Got 'Python PWD = None\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n' 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/Bytestderr: Python argv = ['ksh', '-c', '\necho "PWD = $PWD"; pwd\ncd Byte; echo cd=$?\necho "PWD = $PWD"; pwd\n'] |
| toysh | 25 What happens when inherited $PWD and current dir disagree? [toysh stdout] Expected "Python PWD = '/tmp/osh-spec-cd'\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n" Got "Python PWD = '/tmp/osh-spec-cd'\n" [toysh status] Expected 0 Got 1 [toysh stderr] Found 'Traceback (most recent' stdout: Python PWD = '/tmp/osh-spec-cd'stderr: set: bad --
Python argv = ['']
Traceback (most recent call last):
File "<string>", line 12, in <module>
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 185, in check_call
retcode = call(*popenargs, **kwargs)
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/home/andy/git/oils-for-unix/oils.DEPS/wedge/python2/2.7.18/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
|
| sush | 25 What happens when inherited $PWD and current dir disagree? [sush stdout] Expected "Python PWD = '/tmp/osh-spec-cd'\nPWD = /tmp/osh-spec-cd/cpan/Encode\n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n" Got 'Python PWD = None\nPWD = \n/tmp/osh-spec-cd/cpan/Encode\ncd=0\nPWD = /tmp/osh-spec-cd/cpan/Encode/Byte\n/tmp/osh-spec-cd/cpan/Encode/Byte\n' stdout: Python PWD = None PWD = /tmp/osh-spec-cd/cpan/Encode cd=0 PWD = /tmp/osh-spec-cd/cpan/Encode/Byte /tmp/osh-spec-cd/cpan/Encode/Bytestderr: Python argv = ['/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush', '-c', '\necho "PWD = $PWD"; pwd\ncd Byte; echo cd=$?\necho "PWD = $PWD"; pwd\n'] |
| mksh | 26 Survey of getcwd() syscall stdout: 2 err.txtstderr: |
| ksh | 26 Survey of getcwd() syscall [ksh stdout] Expected '1 err.txt\n' Got '2 err.txt\n' stdout: 2 err.txtstderr: |
| toysh | 26 Survey of getcwd() syscall [toysh stdout] Expected '1 err.txt\n' Got '2 err.txt\n' stdout: 2 err.txtstderr: |
| sush | 26 Survey of getcwd() syscall [sush stdout] Expected '1 err.txt\n' Got '2 err.txt\n' stdout: 2 err.txtstderr: |
| brush | 26 Survey of getcwd() syscall [brush stdout] Expected '1 err.txt\n' Got '2 err.txt\n' stdout: 2 err.txtstderr: |
| osh | 26 Survey of getcwd() syscall [osh stdout] Expected '1 err.txt\n' Got '2 err.txt\n' stdout: 2 err.txtstderr: |
| bash | 27 chdir is a synonym for cd - busybox ash stdout: failstderr: bash: line 1: chdir: command not found |
| toysh | 27 chdir is a synonym for cd - busybox ash [toysh stdout] Expected '/tmp\n' Got 'fail\n' stdout: failstderr: sh: chdir: No such file or directory |
| sush | 27 chdir is a synonym for cd - busybox ash [sush stdout] Expected '/tmp\n' Got 'fail\n' stdout: failstderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: chdir: command not found |
| brush | 27 chdir is a synonym for cd - busybox ash [brush stdout] Expected '/tmp\n' Got '/home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/27-brush\n' stdout: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/builtin-cd.test.sh/27-brushstderr: [31merror:[39m command not found: chdir |