Results for builtin-misc.test.sh

statusbashmkshkshtoyshsushbrushosh
pass 3332237
ok 4200000
BUG 0200000
FAIL 0045540
total7777777
casebashmkshkshtoyshsushbrushoshdescription
0ok BUG FAIL FAIL FAIL FAIL pass history builtin usage
detailsdetailsdetailsdetailsdetailsdetails
1ok ok FAIL FAIL FAIL FAIL pass Print shell strings with weird chars: set and printf %q and ${x@Q}
detailsdetailsdetailsdetailsdetailsdetails
2ok ok FAIL FAIL FAIL FAIL pass Print shell strings with normal chars: set and printf %q and ${x@Q}
detailsdetailsdetailsdetailsdetailsdetails
3pass pass pass pass pass pass pass time pipeline
4pass pass pass FAIL pass pass pass shift
details
5pass pass pass pass FAIL FAIL pass Shifting too far
detailsdetails
6ok BUG FAIL FAIL FAIL pass pass Invalid shift argument
detailsdetailsdetailsdetailsdetails
23 passed, 6 OK, 0 not implemented, 2 BUG, 18 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

bash0 history builtin usage

stdout:
status=0
status=0
status=2
status=1
status=1
stderr:
bash: line 5: history: -5: invalid option
history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
bash: line 7: history: f: numeric argument required
bash: line 9: history: too: numeric argument required
mksh0 history builtin usage

stdout:
status=1
status=1
status=1
status=1
status=1
stderr:
mksh: fc: history functions not available
mksh: <stdin>[3]: fc: history functions not available
mksh: <stdin>[5]: fc: history functions not available
mksh: <stdin>[7]: fc: history functions not available
mksh: <stdin>[9]: fc: history functions not available
ksh0 history builtin usage

[ksh stdout] Expected 'status=0\nstatus=0\nstatus=2\nstatus=2\nstatus=2\n' Got 'status=1\nstatus=1\nstatus=1\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1
status=1
status=1
status=1
stderr:
E: ksh: fc: history functions not available
E: ksh: <stdin>[3]: fc: history functions not available
E: ksh: <stdin>[5]: fc: history functions not available
E: ksh: <stdin>[7]: fc: history functions not available
E: ksh: <stdin>[9]: fc: history functions not available
toysh0 history builtin usage

[toysh stdout] Expected 'status=0\nstatus=0\nstatus=2\nstatus=2\nstatus=2\n' Got 'status=127\nstatus=127\nstatus=127\nstatus=127\nstatus=127\n'

stdout:
status=127
status=127
status=127
status=127
status=127
stderr:
sh: history: No such file or directory
sh: history: No such file or directory
sh: history: No such file or directory
sh: history: No such file or directory
sh: history: No such file or directory
sush0 history builtin usage

[sush stdout] Expected 'status=0\nstatus=0\nstatus=2\nstatus=2\nstatus=2\n' Got 'status=0\nstatus=1\nstatus=1\nstatus=1\nstatus=1\n'

stdout:
status=0
status=1
status=1
status=1
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: history: +5: invalid option
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: history: -5: invalid option
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: history: f: invalid option
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: history: too: invalid option
brush0 history builtin usage

[brush stdout] Expected 'status=0\nstatus=0\nstatus=2\nstatus=2\nstatus=2\n' Got 'status=99\nstatus=99\nstatus=99\nstatus=99\nstatus=99\n'

stdout:
status=99
status=99
status=99
status=99
status=99
stderr:
 WARN unimplemented built-in: history 
 WARN unimplemented built-in: history +5
 WARN unimplemented built-in: history -5
 WARN unimplemented built-in: history f
 WARN unimplemented built-in: history too many args
bash1 Print shell strings with weird chars: set and printf %q and ${x@Q}

stdout:
foo=$'a\nb\001c\'d'
pf  $'a\nb\001c\'d'
@Q  $'a\nb\001c\'d'
stderr:
mksh1 Print shell strings with weird chars: set and printf %q and ${x@Q}

stdout:
stderr: 
ksh1 Print shell strings with weird chars: set and printf %q and ${x@Q}

[ksh stdout] Expected "foo=$'a\\nb\\u0001c\\'d'\npf $'a\\nb\\u0001c\\'d'\n@Q $'a\\nb\\u0001c\\'d'\n" Got "foo=$'a\\nb\\001c\\047d'\npf 'a'$'\\n''b'$'\\001''c'\\''d'\n@Q $'a\nb\x01c'd'\n"

stdout:
foo=$'a\nb\001c\047d'
pf  'a'$'\n''b'$'\001''c'\''d'
@Q  $'a
bc'd'
stderr:
toysh1 Print shell strings with weird chars: set and printf %q and ${x@Q}

[toysh stdout] Expected "foo=$'a\\nb\\u0001c\\'d'\npf $'a\\nb\\u0001c\\'d'\n@Q $'a\\nb\\u0001c\\'d'\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush1 Print shell strings with weird chars: set and printf %q and ${x@Q}

[sush stdout] Expected "foo=$'a\\nb\\u0001c\\'d'\npf $'a\\nb\\u0001c\\'d'\n@Q $'a\\nb\\u0001c\\'d'\n" Got "foo=$'a\\nb\x01c'd'\npf a\nb\x01c\\'d\n"
[sush status] Expected 0, got 1

stdout:
foo=$'a\nbc'd'
pf  a
bc\'d
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 15: `${foo@Q}': bad substitution
brush1 Print shell strings with weird chars: set and printf %q and ${x@Q}

[brush stdout] Expected "foo=$'a\\nb\\u0001c\\'d'\npf $'a\\nb\\u0001c\\'d'\n@Q $'a\\nb\\u0001c\\'d'\n" Got "foo=$'a\\nb\\001c\\'d'\npf 'a'$'\\n''b'$'\\001''c'\\''d'\n@Q $'a\\nb\\001c\\'d'\n"

stdout:
foo=$'a\nb\001c\'d'
pf  'a'$'\n''b'$'\001''c'\''d'
@Q  $'a\nb\001c\'d'
stderr:
ERROR error: i/o error: stream did not contain valid UTF-8
bash2 Print shell strings with normal chars: set and printf %q and ${x@Q}

stdout:
foo=spam
declare -- foo="spam"
pf  spam
@Q  'spam'
stderr:
mksh2 Print shell strings with normal chars: set and printf %q and ${x@Q}

stdout:
foo=spam
typeset foo=spam
pf  spam
@Q  spam
stderr:
ksh2 Print shell strings with normal chars: set and printf %q and ${x@Q}

[ksh stdout] Expected 'foo=spam\ndeclare -- foo=spam\npf spam\n@Q spam\n' Got 'foo=spam\ntypeset foo=spam\npf spam\n@Q spam\n'

stdout:
foo=spam
typeset foo=spam
pf  spam
@Q  spam
stderr:
toysh2 Print shell strings with normal chars: set and printf %q and ${x@Q}

[toysh stdout] Expected 'foo=spam\ndeclare -- foo=spam\npf spam\n@Q spam\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush2 Print shell strings with normal chars: set and printf %q and ${x@Q}

[sush stdout] Expected 'foo=spam\ndeclare -- foo=spam\npf spam\n@Q spam\n' Got 'foo=spam\ndeclare -- foo=spam\npf spam\n'
[sush status] Expected 0, got 1

stdout:
foo=spam
declare -- foo=spam
pf  spam
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: `${foo@Q}': bad substitution
brush2 Print shell strings with normal chars: set and printf %q and ${x@Q}

[brush stdout] Expected 'foo=spam\ndeclare -- foo=spam\npf spam\n@Q spam\n' Got 'foo=spam\ndeclare -- foo="spam"\npf spam\n@Q \'spam\'\n'

stdout:
foo=spam
declare -- foo="spam"
pf  spam
@Q  'spam'
stderr:
toysh4 shift

[toysh stdout] Expected '2 3 4\n4\n', got '\n\n'

stdout:

stderr:
set: bad --
sush5 Shifting too far

[sush status] Expected 1, got 0

stdout:
stderr: 
brush5 Shifting too far

[brush status] Expected 1, got 2

stdout:
stderr: 
bash6 Invalid shift argument

stdout:
stderr: 
bash: line 1: shift: ZZZ: numeric argument required
mksh6 Invalid shift argument

stdout:
stderr: 
ksh6 Invalid shift argument

[ksh status] Expected 2, got 0

stdout:
stderr: 
toysh6 Invalid shift argument

[toysh status] Expected 2, got 1

stdout:
stderr: 
shift: not integer: ZZZ
sush6 Invalid shift argument

[sush status] Expected 2, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shift: ZZZ: numeric argument required