Results for builtin-special.test.sh

statusoshosh-cpp
pass 88
N-I 22
total1010
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 Which shells allow special builtins to be redefined?
4pass pass Special builtins can't be redefined as shell functions (set -o posix)
5pass pass Non-special builtins CAN be redefined as functions
6N-I N-I Shift is special and fails whole script
detailsdetails
7N-I N-I set is special and fails whole script, even if using || true
detailsdetails
8pass pass bash 'type' gets confused - says 'function', but runs builtin
9pass pass command, builtin - both can be redefined, not special (regression)
16 passed, 0 OK, 4 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh6 Shift is special and fails whole script

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

stdout:
status=1
stderr:
osh7 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-cpp7 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_'