Results for builtin-cd.test.sh

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

Details on runs that didn't PASS

osh1 cd BAD/..

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

stdout:
status=0
stderr:
osh-cpp1 cd BAD/..

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

stdout:
status=0
stderr:
osh-cpp7 pwd after cd ..

[osh-cpp stdout] Expected 'dir-two\ndir-one\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $(basename $(pwd))
                       ^
[ stdin ]:4: Invalid word while parsing command list
osh-cpp8 pwd with symlink and -P

[osh-cpp stdout] Expected 'pwd:\nsymlink\npwd -P:\ntarget\n' Got 'pwd:\n'
[osh-cpp status] Expected 0 Got 2

stdout:
pwd:
stderr:
  basename $(pwd)
                ^
[ stdin ]:8: Invalid word while parsing command list
osh-cpp14 pwd in symlinked dir on shell initialization

[osh-cpp stdout] Expected 'symlink\ntarget\n' Got ''
[osh-cpp stderr] Expected u'' Got ' basename $(pwd)\n ^\n[ -c flag ]:1: Invalid word while parsing command list\n basename $(pwd)\n ^\n[ -c flag ]:1: Invalid word while parsing command list\n'
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  basename $(pwd)
                ^
[ -c flag ]:1: Invalid word while parsing command list
  basename $(pwd)
                ^
[ -c flag ]:1: Invalid word while parsing command list
osh-cpp16 cd with no arguments

[osh-cpp stdout] Expected 'OK\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  test $(pwd) = "$HOME" && echo OK
            ^
[ stdin ]:4: Invalid word while parsing command list
osh-cpp18 cd away from dir that was deleted

[osh-cpp stdout] Expected 'cd-nonexistent\nstatus=0\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $(basename $OLDPWD)
                         ^
[ stdin ]:6: Invalid word while parsing command list
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
osh-cpp23 CDPATH is respected

[osh-cpp 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-cpp\n'

stdout:
status=1
/home/uke/oil/_tmp/spec-tmp/builtin-cd.test.sh/23-osh-cpp
stderr:
  cd foo
     ^~~
[ stdin ]:5: cd '/home/uke/oil/_tmp/spec-tmp/builtin-cd.test.sh/23-osh-cpp/foo': No such file or directory
osh-cpp24 Change directory in non-shell parent process (make or Python)

[osh-cpp stdout] Expected '/cpan/Encode/Byte\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  old_dir=$(pwd)
               ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp25 What happens when inherited $PWD and current dir disagree?

[osh-cpp 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 ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  old_dir=$(pwd)
               ^
[ stdin ]:5: Invalid word while parsing command list
osh26 Survey of getcwd() syscall

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

stdout:
3 err.txt
stderr:
osh-cpp26 Survey of getcwd() syscall

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

stdout:
3 err.txt
stderr: