Results for builtin-special.test.sh

statusbashdashmkshzshashyashosh
pass 67975510
ok 1310310
N-I 2212442
BUG 3013020
total12121212121212
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
3pass pass pass pass pass BUG pass Prefix binding for exec is a special case (versus e.g. readonly)
details
4pass ok ok pass ok ok pass exec without args is a special case of the special case in some shells
detailsdetailsdetailsdetails
5BUG ok pass BUG ok pass pass Which shells allow special builtins to be redefined?
detailsdetailsdetailsdetails
6ok ok pass BUG ok pass pass Special builtins can't be redefined as shell functions (set -o posix)
detailsdetailsdetailsdetails
7pass pass pass pass pass pass pass Non-special builtins CAN be redefined as functions
8N-I pass pass N-I N-I N-I N-I Shift is special and fails whole script
detailsdetailsdetailsdetailsdetails
9N-I pass pass pass N-I N-I N-I set is special and fails whole script, even if using || true
detailsdetailsdetailsdetails
10BUG N-I N-I N-I N-I N-I pass bash 'type' gets confused - says 'function', but runs builtin
detailsdetailsdetailsdetailsdetailsdetails
11pass N-I pass pass N-I N-I pass command, builtin - both can be redefined, not special (regression)
detailsdetailsdetails
49 passed, 9 OK, 17 not implemented, 9 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:
yash3 Prefix binding for exec is a special case (versus e.g. readonly)

stdout:
pre1=pre1 x= pre2=pre2
stderr:
dash4 exec without args is a special case of the special case in some shells

stdout:
stderr: 
FOO=bar
mksh4 exec without args is a special case of the special case in some shells

stdout:
stderr: 
FOO=bar
ash4 exec without args is a special case of the special case in some shells

stdout:
stderr: 
FOO=bar
yash4 exec without args is a special case of the special case in some shells

stdout:
stderr: 
FOO=bar
bash5 Which shells allow special builtins to be redefined?

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

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

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

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

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

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

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

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

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

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

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

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

stdout:
status=1
stderr:
bash9 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
ash9 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_
yash9 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
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_'
bash10 bash 'type' gets confused - says 'function', but runs builtin

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

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

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

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

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

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

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

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

stdout:
stderr: