Results for builtin-special.test.sh

statusbashdashmkshzshashyashosh
pass 4685458
ok 1200200
N-I 2212442
BUG 3013010
total10101010101010
casebashdashmkshzshashyashoshdescription
0pass pass BUG pass pass pass pass true is not special; prefix assignments don't persist, it can be redefined
details
1pass pass pass BUG pass pass pass Prefix assignments persist after special builtins, like : (set -o posix)
details
2BUG pass pass pass pass BUG pass Prefix assignments persist after readonly, but NOT exported (set -o posix)
detailsdetails
3BUG ok pass BUG ok pass pass Which shells allow special builtins to be redefined?
detailsdetailsdetailsdetails
4ok ok pass BUG ok pass pass Special builtins can't be redefined as shell functions (set -o posix)
detailsdetailsdetailsdetails
5pass pass pass pass pass pass pass Non-special builtins CAN be redefined as functions
6N-I pass pass N-I N-I N-I N-I Shift is special and fails whole script
detailsdetailsdetailsdetailsdetails
7N-I pass pass pass N-I N-I N-I set is special and fails whole script, even if using || true
detailsdetailsdetailsdetails
8BUG N-I N-I N-I N-I N-I pass bash 'type' gets confused - says 'function', but runs builtin
detailsdetailsdetailsdetailsdetailsdetails
9pass N-I pass pass N-I N-I pass command, builtin - both can be redefined, not special (regression)
detailsdetailsdetails
40 passed, 5 OK, 17 not implemented, 8 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

mksh0 true is not special; prefix assignments don't persist, it can be redefined

stdout:
foo=
true func
foo=bar
stderr:
zsh1 Prefix assignments persist after special builtins, like : (set -o posix)

stdout:
foo=
z=
stderr:
bash2 Prefix assignments persist after readonly, but NOT exported (set -o posix)

stdout:
foo=bar
spam=eggs
bar
None
stderr:
yash2 Prefix assignments persist after readonly, but NOT exported (set -o posix)

stdout:
foo=bar
spam=eggs
bar
None
stderr:
bash3 Which shells allow special builtins to be redefined?

stdout:
eval func echo hi
stderr:
dash3 Which shells allow special builtins to be redefined?

stdout:
stderr: 
dash: 1: Syntax error: Bad function name
zsh3 Which shells allow special builtins to be redefined?

stdout:
eval func echo hi
stderr:
ash3 Which shells allow special builtins to be redefined?

stdout:
stderr: 
ash: syntax error: bad function name
bash4 Special builtins can't be redefined as shell functions (set -o posix)

stdout:
hi
stderr:
bash: line 9: `eval': is a special builtin
dash4 Special builtins can't be redefined as shell functions (set -o posix)

stdout:
hi
stderr:
dash: 7: Syntax error: Bad function name
zsh4 Special builtins can't be redefined as shell functions (set -o posix)

stdout:
hi
sh func echo hi
stderr:
ash4 Special builtins can't be redefined as shell functions (set -o posix)

stdout:
hi
stderr:
ash: syntax error: bad function name
bash6 Shift is special and fails whole script

stdout:
status=1
stderr:
bash: line 6: shift: 3: shift count out of range
zsh6 Shift is special and fails whole script

stdout:
status=1
stderr:
zsh:shift:6: shift count must be <= $#
ash6 Shift is special and fails whole script

stdout:
status=1
stderr:
yash6 Shift is special and fails whole script

stdout:
status=1
stderr:
shift: 3: cannot shift so many (there are only 2 positional parameters)
osh6 Shift is special and fails whole script

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

stdout:
ok
should not get here
stderr:
bash: line 6: shopt: invalid_: invalid shell option name
bash: line 8: set: invalid_: invalid option name
ash7 set is special and fails whole script, even if using || true

stdout:
ok
should not get here
stderr:
ash: shopt: not found
ash: set: line 7: illegal option -o invalid_
yash7 set is special and fails whole script, even if using || true

stdout:
ok
should not get here
stderr:
yash: no such command `shopt'
set: `invalid_' is not a valid option
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_'
bash8 bash 'type' gets confused - says 'function', but runs builtin

stdout:
TRUE
builtin
function
---
EVAL
builtin
shell function: echo before posix
after posix
function
stderr:
dash8 bash 'type' gets confused - says 'function', but runs builtin

stdout:
stderr: 
mksh8 bash 'type' gets confused - says 'function', but runs builtin

stdout:
stderr: 
zsh8 bash 'type' gets confused - says 'function', but runs builtin

stdout:
stderr: 
ash8 bash 'type' gets confused - says 'function', but runs builtin

stdout:
stderr: 
yash8 bash 'type' gets confused - says 'function', but runs builtin

stdout:
stderr: 
dash9 command, builtin - both can be redefined, not special (regression)

stdout:
stderr: 
ash9 command, builtin - both can be redefined, not special (regression)

stdout:
stderr: 
yash9 command, builtin - both can be redefined, not special (regression)

stdout:
stderr: