Results for builtin-special.test.sh

statusoshosh-cpp
pass 44
ok 11
FAIL 33
total88
caseoshosh-cppdescription
0pass pass : is special and prefix assignments persist after special builtins (set -o posix)
1ok ok readonly is special and prefix assignments persist (set -o posix)
detailsdetails
2pass pass true is not special
3FAIL FAIL Shift is special and the whole script exits if it returns non-zero
detailsdetails
4FAIL FAIL set is special and fails, even if using || true
detailsdetails
5FAIL FAIL Special builtins can't be redefined as functions (set -o posix)
detailsdetails
6pass pass Non-special builtins CAN be redefined as functions
7pass pass command, builtin - both can be redefined, not special (regression)
8 passed, 2 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 readonly is special and prefix assignments persist (set -o posix)

stdout:
foo=bar
spam=eggs
bar
None
stderr:
osh-cpp1 readonly is special and prefix assignments persist (set -o posix)

stdout:
foo=bar
spam=eggs
bar
None
stderr:
osh3 Shift is special and the whole script exits if it returns non-zero

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

stdout:
status=1
stderr:
osh-cpp3 Shift is special and the whole script exits if it returns non-zero

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

stdout:
status=1
stderr:
osh4 set is special and fails, even if using || true

[osh stdout] Expected 'ok\n', got 'ok\nshould not get here\n'
[osh status] Expected 1, got 0

stdout:
ok
should not get here
stderr:
  shopt -s invalid_ || true
  ^~~~~
[ stdin ]:1: 'shopt' got invalid option 'invalid_'
  set -o invalid_ || true
  ^~~
[ stdin ]:3: 'set' got invalid option 'invalid_'
osh-cpp4 set is special and fails, even if using || true

[osh-cpp stdout] Expected 'ok\n', got 'ok\nshould not get here\n'
[osh-cpp status] Expected 1, got 0

stdout:
ok
should not get here
stderr:
  shopt -s invalid_ || true
  ^~~~~
[ stdin ]:1: 'shopt' got invalid option 'invalid_'
  set -o invalid_ || true
  ^~~
[ stdin ]:3: 'set' got invalid option 'invalid_'
osh5 Special builtins can't be redefined as functions (set -o posix)

[osh status] Expected 2, got 0

stdout:
status=0
stderr:
osh-cpp5 Special builtins can't be redefined as functions (set -o posix)

[osh-cpp status] Expected 2, got 0

stdout:
status=0
stderr: