Results for builtin-special.test.sh

statusbashdashmkshzshashyashosh
pass 5865635
ok 2000011
N-I 0211220
BUG-2 0020021
BUG 3014220
FAIL 0000003
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
2ok pass pass pass pass ok ok readonly is special and prefix assignments persist (set -o posix)
detailsdetailsdetails
3BUG pass BUG-2 BUG pass BUG-2 BUG-2 Which shells allow special builtins to be redefined?
detailsdetailsdetailsdetailsdetails
4pass pass BUG-2 BUG pass BUG-2 FAIL 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
6BUG pass pass BUG BUG BUG FAIL Shift is special and fails whole script
detailsdetailsdetailsdetailsdetails
7BUG pass pass pass BUG BUG FAIL set is special and fails whole script, even if using || true
detailsdetailsdetailsdetails
8ok 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
38 passed, 4 OK, 8 not implemented, 17 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

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 readonly is special and prefix assignments persist (set -o posix)

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

stdout:
foo=bar
spam=eggs
bar
None
stderr:
osh2 readonly is special and prefix assignments persist (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:
mksh3 Which shells allow special builtins to be redefined?

stdout:
hi
stderr:
zsh3 Which shells allow special builtins to be redefined?

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

stdout:
hi
stderr:
osh3 Which shells allow special builtins to be redefined?

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

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

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

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

[osh stdout] Expected 'hi\n', got 'hi\nhi\n'
[osh status] Expected 2, got 0

stdout:
hi
hi
stderr:
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

[osh stdout] Expected 'non-zero status\n', got 'status=1\n'

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

[osh stdout] Expected 'ok\nnon-zero status\n', got 'ok\nshould not get here\n'

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: