Results for builtin-special.test.sh

statusoshosh-cpp
pass 1010
N-I 22
total1212
caseoshosh-cppdescription
0pass pass true is not special; prefix assignments don't persist, it can be redefined
1pass pass Prefix assignments persist after special builtins, like : (set -o posix)
2pass pass Prefix assignments persist after readonly, but NOT exported (set -o posix)
3pass pass Prefix binding to exec - adapted from toysh
4pass pass Prefix binding for readonly vs. exec
5pass pass Which shells allow special builtins to be redefined?
6pass pass Special builtins can't be redefined as shell functions (set -o posix)
7pass pass Non-special builtins CAN be redefined as functions
8N-I N-I Shift is special and fails whole script
detailsdetails
9N-I N-I set is special and fails whole script, even if using || true
detailsdetails
10pass pass bash 'type' gets confused - says 'function', but runs builtin
11pass pass command, builtin - both can be redefined, not special (regression)
20 passed, 0 OK, 4 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh8 Shift is special and fails whole script

stdout:
status=1
stderr:
osh-cpp8 Shift is special and fails whole script

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

stdout:
ok
should not get here
stderr:
  shopt -s invalid_ || true
  ^~~~~
[ -c flag ]:6: 'shopt' got invalid option 'invalid_'
  set -o invalid_ || true
  ^~~
[ -c flag ]:8: 'set' got invalid option 'invalid_'
osh-cpp9 set is special and fails whole script, even if using || true

stdout:
ok
should not get here
stderr:
  shopt -s invalid_ || true
  ^~~~~
[ -c flag ]:6: 'shopt' got invalid option 'invalid_'
  set -o invalid_ || true
  ^~~
[ -c flag ]:8: 'set' got invalid option 'invalid_'