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