Results for builtin-special.test.sh

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