Results for builtin-special.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 675791043710
ok 1330100000
N-I 2242100002
BUG 3003100000
FAIL 0000028950
total12121212121212121212
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass pass BUG pass pass pass pass pass true is not special; prefix assignments don't persist, it can be redefined
details
1pass pass pass BUG pass pass FAIL FAIL FAIL pass Prefix assignments persist after special builtins, like : (set -o posix)
detailsdetailsdetailsdetails
2BUG pass pass pass pass pass FAIL FAIL FAIL pass Prefix assignments persist after readonly, but NOT exported (set -o posix)
detailsdetailsdetailsdetails
3pass pass pass pass pass pass pass FAIL pass pass Prefix binding for exec is a special case (versus e.g. readonly)
details
4pass ok ok pass ok FAIL pass pass pass pass exec without args is a special case of the special case in some shells
detailsdetailsdetailsdetails
5BUG ok ok BUG pass pass FAIL FAIL pass pass Which shells allow special builtins to be redefined?
detailsdetailsdetailsdetailsdetailsdetails
6ok ok ok BUG pass pass FAIL FAIL pass pass Special builtins can't be redefined as shell functions (set -o posix)
detailsdetailsdetailsdetailsdetailsdetails
7pass pass pass pass pass pass pass pass pass pass Non-special builtins CAN be redefined as functions
8N-I pass N-I N-I pass pass FAIL FAIL FAIL N-I Shift is special and fails whole script
detailsdetailsdetailsdetailsdetailsdetailsdetails
9N-I pass N-I pass pass pass FAIL FAIL FAIL N-I set is special and fails whole script, even if using || true
detailsdetailsdetailsdetailsdetailsdetails
10BUG N-I N-I N-I N-I FAIL FAIL FAIL FAIL pass bash 'type' gets confused - says 'function', but runs builtin
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
11pass N-I N-I pass pass pass FAIL FAIL pass pass command, builtin - both can be redefined, not special (regression)
detailsdetailsdetailsdetails
68 passed, 8 OK, 13 not implemented, 7 BUG, 24 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:
toysh1 Prefix assignments persist after special builtins, like : (set -o posix)

[toysh stdout] Expected 'foo=bar\nz=\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush1 Prefix assignments persist after special builtins, like : (set -o posix)

[sush stdout] Expected 'foo=bar\nz=\n', got 'foo=\nz=\n'

stdout:
foo=
z=
stderr:
brush1 Prefix assignments persist after special builtins, like : (set -o posix)

[brush stdout] Expected 'foo=bar\nz=\n', got 'foo=\nz=\n'

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

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

[toysh stdout] Expected 'foo=bar\nspam=eggs\nNone\nNone\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush2 Prefix assignments persist after readonly, but NOT exported (set -o posix)

[sush stdout] Expected 'foo=bar\nspam=eggs\nNone\nNone\n', got 'foo=\nspam=eggs\nNone\nNone\n'

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

[brush stdout] Expected 'foo=bar\nspam=eggs\nNone\nNone\n', got 'foo=\nspam=eggs\nNone\nNone\n'

stdout:
foo=
spam=eggs
None
None
stderr:
sush3 Prefix binding for exec is a special case (versus e.g. readonly)

[sush stdout] Expected 'pre1= x= pre2=pre2\n', got 'pre1= x= pre2=\n'

stdout:
pre1= x= pre2=
stderr:
dash4 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
mksh4 exec without args is a special case of the special case in some shells

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

[ksh stderr] Expected 'FOO=\n', got 'FOO=bar\n'

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
ash5 Which shells allow special builtins to be redefined?

stdout:
stderr: 
ash: syntax error: bad function name
zsh5 Which shells allow special builtins to be redefined?

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

[toysh stdout] Expected 'hi\n', got 'eval func echo hi\n'

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

[sush stdout] Expected 'hi\n', got 'eval func echo hi\n'

stdout:
eval func echo hi
stderr:
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
ash6 Special builtins can't be redefined as shell functions (set -o posix)

stdout:
hi
stderr:
ash: 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:
toysh6 Special builtins can't be redefined as shell functions (set -o posix)

[toysh stdout] Expected 'hi\nhi\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush6 Special builtins can't be redefined as shell functions (set -o posix)

[sush stdout] Expected 'hi\nhi\n', got 'hi\nsh func echo hi\n'

stdout:
hi
sh func echo hi
stderr:
bash8 Shift is special and fails whole script

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

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

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

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

stdout:
status=1
stderr:
set: bad --
sush8 Shift is special and fails whole script

[sush stdout] Expected 'non-zero status\n', got 'status=0\n'

stdout:
status=0
stderr:
brush8 Shift is special and fails whole script

[brush stdout] Expected 'non-zero status\n', got 'status=2\n'

stdout:
status=2
stderr:
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_
toysh9 set is special and fails whole script, even if using || true

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

stdout:
ok
should not get here
stderr:
sh: shopt: No such file or directory
set: bad -o invalid_
sush9 set is special and fails whole script, even if using || true

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

stdout:
ok
should not get here
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: shopt: invalid_: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: set: invalid_: invalid option name
brush9 set is special and fails whole script, even if using || true

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

stdout:
ok
should not get here
stderr:
shopt: invalid_: invalid shell option name
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: 
ash10 bash 'type' gets confused - says 'function', but runs builtin

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

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

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

[ksh stdout] Expected 'TRUE\nbuiltin\nfunction\n---\nEVAL\nbuiltin\nbefore posix\nafter posix\nbuiltin\n' Got 'TRUE\n---\nEVAL\nbefore posix\nafter posix\n'
[ksh status] Expected 0, got 1

stdout:
TRUE
---
EVAL
before posix
after posix
stderr:
E: ksh: <stdin>[4]: whence: -t: unknown option
E: ksh: <stdin>[6]: whence: -t: unknown option
E: ksh: <stdin>[11]: whence: -t: unknown option
E: ksh: <stdin>[20]: whence: -t: unknown option
toysh10 bash 'type' gets confused - says 'function', but runs builtin

[toysh stdout] Expected 'TRUE\nbuiltin\nfunction\n---\nEVAL\nbuiltin\nbefore posix\nafter posix\nbuiltin\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush10 bash 'type' gets confused - says 'function', but runs builtin

[sush stdout] Expected 'TRUE\nbuiltin\nfunction\n---\nEVAL\nbuiltin\nbefore posix\nafter posix\nbuiltin\n' Got 'TRUE\nbuiltin\nfunction\n---\nEVAL\nbuiltin\nshell function: echo before posix\nshell function: echo after posix\nfunction\n'

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

[brush stdout] Expected 'TRUE\nbuiltin\nfunction\n---\nEVAL\nbuiltin\nbefore posix\nafter posix\nbuiltin\n' Got 'TRUE\nbuiltin\nfunction\n---\nEVAL\nbuiltin\nbefore posix\nafter posix\nfunction\n'

stdout:
TRUE
builtin
function
---
EVAL
builtin
before posix
after posix
function
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: 
toysh11 command, builtin - both can be redefined, not special (regression)

[toysh stdout] Expected 'b\nc\nbuiltin-redef echo b\ncommand-redef echo c\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush11 command, builtin - both can be redefined, not special (regression)

[sush stdout] Expected 'b\nc\nbuiltin-redef echo b\ncommand-redef echo c\n' Got 'c\nbuiltin-redef echo b\ncommand-redef echo c\n'

stdout:
c
builtin-redef echo b
command-redef echo c
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: builtin: echo: not a shell builtin