Results for errexit-osh.test.sh

statusbashmkshkshtoyshsushbrushosh
pass 15101111131335
ok 1400000
N-I 192100000
FAIL 00242322220
TIME 0001000
total35353535353535
casebashmkshkshtoyshsushbrushoshdescription
0pass ok FAIL pass pass pass pass command sub: errexit is NOT inherited and outer shell keeps going
detailsdetails
1pass pass pass FAIL FAIL FAIL pass command sub with inherit_errexit only
detailsdetailsdetails
2N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit and assignment builtins (local, export, readonly ...)
detailsdetailsdetailsdetailsdetailsdetails
3N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit and command sub in export / readonly
detailsdetailsdetailsdetailsdetailsdetails
4N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit disallows pipeline
detailsdetailsdetailsdetailsdetailsdetails
5pass pass pass pass pass pass pass strict_errexit allows singleton pipeline
6pass pass pass pass pass pass pass strict_errexit with && || !
7ok ok FAIL FAIL FAIL FAIL pass strict_errexit detects proc in && || !
detailsdetailsdetailsdetailsdetailsdetails
8N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit without errexit proc
detailsdetailsdetailsdetailsdetailsdetails
9N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit without errexit proc / command sub
detailsdetailsdetailsdetailsdetailsdetails
10N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit and errexit disabled
detailsdetailsdetailsdetailsdetailsdetails
11pass N-I FAIL pass pass pass pass command sub with command_sub_errexit only
detailsdetails
12N-I N-I FAIL FAIL FAIL FAIL pass command_sub_errexit stops at first error
detailsdetailsdetailsdetailsdetailsdetails
13N-I N-I FAIL FAIL FAIL FAIL pass command sub with inherit_errexit and command_sub_errexit
detailsdetailsdetailsdetailsdetailsdetails
14pass pass pass pass pass pass pass command sub: last command fails but keeps going and exit code is 0
15pass ok FAIL pass pass pass pass global assignment with command sub: middle command fails
detailsdetails
16pass pass pass FAIL FAIL FAIL pass global assignment with command sub: last command fails and it aborts
detailsdetailsdetails
17pass ok FAIL FAIL pass pass pass local: middle command fails and keeps going
detailsdetailsdetails
18pass pass pass pass pass pass pass local: last command fails and also keeps going
19N-I N-I FAIL FAIL FAIL FAIL pass local and inherit_errexit / command_sub_errexit
detailsdetailsdetailsdetailsdetailsdetails
20pass pass pass pass FAIL pass pass global assignment when last status is failure
details
21N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit prevents errexit from being disabled in function
detailsdetailsdetailsdetailsdetailsdetails
22N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit prevents errexit from being disabled in brace group
detailsdetailsdetailsdetailsdetailsdetails
23N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit prevents errexit from being disabled in subshell
detailsdetailsdetailsdetailsdetailsdetails
24N-I N-I FAIL FAIL FAIL FAIL pass strict_errexit and ! && || if while until
detailsdetailsdetailsdetailsdetailsdetails
25pass pass pass pass pass pass pass if pipeline doesn't fail fatally
26pass pass pass FAIL pass pass pass errexit is silent (verbose_errexit for Oil)
details
27N-I N-I FAIL FAIL pass FAIL pass command sub errexit preserves exit code
detailsdetailsdetailsdetailsdetails
28N-I N-I FAIL FAIL FAIL FAIL pass What's in strict:all?
detailsdetailsdetailsdetailsdetailsdetails
29N-I N-I FAIL FAIL FAIL FAIL pass command_sub_errexit causes local d=$(date %x) to fail
detailsdetailsdetailsdetailsdetailsdetails
30N-I N-I pass FAIL FAIL FAIL pass command_sub_errexit and command sub in array
detailsdetailsdetailsdetailsdetails
31pass N-I FAIL pass pass pass pass OLD: command sub in conditional, with inherit_errexit
detailsdetails
32pass pass pass pass pass pass pass OLD: command sub in redirect in conditional
33N-I N-I FAIL FAIL FAIL FAIL pass Regression
detailsdetailsdetailsdetailsdetailsdetails
34N-I N-I FAIL TIME FAIL FAIL pass ShAssignment used as conditional
detailsdetailsdetailsdetailsdetailsdetails
108 passed, 5 OK, 40 not implemented, 0 BUG, 91 failed, 1 timeouts, 0 cases skipped

Details on runs that didn't PASS

mksh0 command sub: errexit is NOT inherited and outer shell keeps going

stdout:
one
parent status=0
stderr:
ksh0 command sub: errexit is NOT inherited and outer shell keeps going

[ksh stdout] Expected 'one two\nparent status=0\n', got 'one\nparent status=0\n'

stdout:
one
parent status=0
stderr:
toysh1 command sub with inherit_errexit only

[toysh stdout] Expected 'zero\none\nparent status=0\n', got 'zero\none two\nparent status=0\n'

stdout:
zero
one two
parent status=0
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sush1 command sub with inherit_errexit only

[sush stdout] Expected 'zero\none\nparent status=0\n', got 'zero\none two\nparent status=0\n'

stdout:
zero
one two
parent status=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: inherit_errexit: not supported yet
brush1 command sub with inherit_errexit only

[brush stdout] Expected 'zero\none\nparent status=0\n', got 'zero\none two\nparent status=0\n'

stdout:
zero
one two
parent status=0
stderr:
bash2 strict_errexit and assignment builtins (local, export, readonly ...)

stdout:
x=hi
---
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
mksh2 strict_errexit and assignment builtins (local, export, readonly ...)

stdout:
x=hi
---
stderr:
mksh: <stdin>[2]: shopt: not found
ksh2 strict_errexit and assignment builtins (local, export, readonly ...)

[ksh stdout] Expected '', got 'x=hi\n---\n'
[ksh status] Expected 1, got 0

stdout:
x=hi
---
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
toysh2 strict_errexit and assignment builtins (local, export, readonly ...)

[toysh stdout] Expected '', got 'x=hi\n---\n'
[toysh status] Expected 1, got 0

stdout:
x=hi
---
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sush2 strict_errexit and assignment builtins (local, export, readonly ...)

[sush stdout] Expected '', got 'x=hi\n---\n'
[sush status] Expected 1, got 0

stdout:
x=hi
---
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
brush2 strict_errexit and assignment builtins (local, export, readonly ...)

[brush stdout] Expected '', got 'x=hi\n---\n'
[brush status] Expected 1, got 0

stdout:
x=hi
---
stderr:
shopt: strict_errexit: invalid shell option name
bash3 strict_errexit and command sub in export / readonly

stdout:
stderr: 
mksh3 strict_errexit and command sub in export / readonly

stdout:
stderr: 
ksh3 strict_errexit and command sub in export / readonly

[ksh stdout] Expected 'a\nstatus=1\na\nstatus=1\na\nb\nstatus=0\n', got 'status=1\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1
status=1
stderr:
E: ksh: -O: unknown option
E: ksh: -O: unknown option
E: ksh: -O: unknown option
toysh3 strict_errexit and command sub in export / readonly

[toysh stdout] Expected 'a\nstatus=1\na\nstatus=1\na\nb\nstatus=0\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush3 strict_errexit and command sub in export / readonly

[sush stdout] Expected 'a\nstatus=1\na\nstatus=1\na\nb\nstatus=0\n', got 'status=2\nstatus=2\nstatus=2\n'

stdout:
status=2
status=2
status=2
stderr:
: line : errexit: invalid option name
: line : errexit: invalid option name
: line : errexit: invalid option name
brush3 strict_errexit and command sub in export / readonly

[brush stdout] Expected 'a\nstatus=1\na\nstatus=1\na\nb\nstatus=0\n', got 'status=1\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1
status=1
stderr:
ERROR error: failed to source file: -o; i/o error: No such file or directory (os error 2)
ERROR error: failed to source file: -o; i/o error: No such file or directory (os error 2)
ERROR error: failed to source file: -o; i/o error: No such file or directory (os error 2)
bash4 strict_errexit disallows pipeline

stdout:
1
one
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
mksh4 strict_errexit disallows pipeline

stdout:
1
one
stderr:
mksh: <stdin>[2]: shopt: not found
ksh4 strict_errexit disallows pipeline

[ksh status] Expected 1, got 0

stdout:
1
one
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
toysh4 strict_errexit disallows pipeline

[toysh status] Expected 1, got 0

stdout:
1
one
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sush4 strict_errexit disallows pipeline

[sush status] Expected 1, got 0

stdout:
1
one
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
brush4 strict_errexit disallows pipeline

[brush status] Expected 1, got 0

stdout:
1
one
stderr:
shopt: strict_errexit: invalid shell option name
bash7 strict_errexit detects proc in && || !

stdout:
failing
should not get here
failing
should not get here
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
mksh7 strict_errexit detects proc in && || !

stdout:
failing
should not get here
failing
should not get here
stderr:
mksh: <stdin>[2]: shopt: not found
ksh7 strict_errexit detects proc in && || !

[ksh stdout] Expected '', got 'failing\nshould not get here\nfailing\nshould not get here\n'
[ksh status] Expected 1, got 0

stdout:
failing
should not get here
failing
should not get here
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
toysh7 strict_errexit detects proc in && || !

[toysh stdout] Expected '', got 'B\nA\n'
[toysh status] Expected 1, got 0

stdout:
B
A
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sh: myfunc: No such file or directory
sh: myfunc: No such file or directory
sush7 strict_errexit detects proc in && || !

[sush stdout] Expected '', got 'failing\nshould not get here\nfailing\nshould not get here\n'
[sush status] Expected 1, got 0

stdout:
failing
should not get here
failing
should not get here
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
brush7 strict_errexit detects proc in && || !

[brush stdout] Expected '', got 'failing\nshould not get here\nfailing\nshould not get here\n'
[brush status] Expected 1, got 0

stdout:
failing
should not get here
failing
should not get here
stderr:
shopt: strict_errexit: invalid shell option name
bash8 strict_errexit without errexit proc

stdout:
myproc
myproc
stderr:
bash: line 6: shopt: strict_errexit: invalid shell option name
mksh8 strict_errexit without errexit proc

stdout:
myproc
myproc
stderr:
mksh: <stdin>[6]: shopt: not found
ksh8 strict_errexit without errexit proc

[ksh stdout] Expected 'myproc\n', got 'myproc\nmyproc\n'
[ksh status] Expected 1, got 0

stdout:
myproc
myproc
stderr:
E: ksh: <stdin>[6]: shopt: inaccessible or not found
toysh8 strict_errexit without errexit proc

[toysh stdout] Expected 'myproc\n', got 'myproc\nmyproc\n'
[toysh status] Expected 1, got 0

stdout:
myproc
myproc
stderr:
sh: shopt: No such file or directory
sush8 strict_errexit without errexit proc

[sush stdout] Expected 'myproc\n', got 'myproc\nmyproc\n'
[sush status] Expected 1, got 0

stdout:
myproc
myproc
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: shopt: strict_errexit: not supported yet
brush8 strict_errexit without errexit proc

[brush stdout] Expected 'myproc\n', got 'myproc\nmyproc\n'
[brush status] Expected 1, got 0

stdout:
myproc
myproc
stderr:
shopt: strict_errexit: invalid shell option name
bash9 strict_errexit without errexit proc / command sub

stdout:
before
x=
ok
stderr:
bash: line 1: shopt: strict_errexit: invalid shell option name
mksh9 strict_errexit without errexit proc / command sub

stdout:
before
x=
ok
stderr:
mksh: <stdin>[1]: shopt: not found
ksh9 strict_errexit without errexit proc / command sub

[ksh stdout] Expected '', got 'before\nx=\nok\n'
[ksh status] Expected 1, got 0

stdout:
before
x=
ok
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
toysh9 strict_errexit without errexit proc / command sub

[toysh stdout] Expected '', got 'before\nx=\nok\n'
[toysh status] Expected 1, got 0

stdout:
before
x=
ok
stderr:
sh: shopt: No such file or directory
sush9 strict_errexit without errexit proc / command sub

[sush stdout] Expected '', got 'before\nx=\nok\n'
[sush status] Expected 1, got 0

stdout:
before
x=
ok
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_errexit: not supported yet
brush9 strict_errexit without errexit proc / command sub

[brush stdout] Expected '', got 'before\nx=\nok\n'
[brush status] Expected 1, got 0

stdout:
before
x=
ok
stderr:
shopt: strict_errexit: invalid shell option name
bash10 strict_errexit and errexit disabled

stdout:
stderr: 
mksh10 strict_errexit and errexit disabled

stdout:
stderr: 
ksh10 strict_errexit and errexit disabled

[ksh stdout] Expected 'before\nx=\n', got ''
[ksh status] Expected 0, got 127

stdout:
stderr: 
E: ksh: <stdin>[3]: shopt: inaccessible or not found
E: ksh: <stdin>[13]: shopt: inaccessible or not found
toysh10 strict_errexit and errexit disabled

[toysh stdout] Expected 'before\nx=\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush10 strict_errexit and errexit disabled

[sush status] Expected 0, got 2

stdout:
before
x=
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: parse_brace: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: set: errexit: invalid option name
sush: shopt: --: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 16: Unexpected token: }

brush10 strict_errexit and errexit disabled

[brush status] Expected 0, got 2

stdout:
before
x=
stderr:
shopt: parse_brace: invalid shell option name
shopt: strict_errexit: invalid shell option name
error: unexpected argument '--unset' found

  tip: to pass '--unset' as a value, use '-- --unset'

Usage: shopt [OPTIONS] [OPTIONS]...

For more information, try '--help'.

ERROR main: syntax error near token `
' (line 1 col 2)
mksh11 command sub with command_sub_errexit only

stdout:
zero
one
parent status=0
stderr:
mksh: <stdin>[2]: shopt: not found
ksh11 command sub with command_sub_errexit only

[ksh stdout] Expected 'zero\none two\nparent status=0\n', got 'zero\none\nparent status=0\n'

stdout:
zero
one
parent status=0
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
bash12 command_sub_errexit stops at first error

stdout:
stderr: 
mksh12 command_sub_errexit stops at first error

stdout:
stderr: 
ksh12 command_sub_errexit stops at first error

[ksh stdout] Expected 'OK\n', got ''
[ksh status] Expected 0, got 127

stdout:
stderr: 
E: ksh: <stdin>[4]: shopt: inaccessible or not found
E: ksh: <stdin>[8]: try: inaccessible or not found
toysh12 command_sub_errexit stops at first error

[toysh stdout] Expected 'OK\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush12 command_sub_errexit stops at first error

[sush stdout] Expected 'OK\n', got '\n'

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: errexit: invalid option name
sush: shopt: --: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: try: command not found
date: invalid date ā€˜%d’
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: Unexpected token: }

brush12 command_sub_errexit stops at first error

[brush stdout] Expected 'OK\n', got '\n'

stdout:
stderr: 
error: unexpected argument '--set' found

  tip: to pass '--set' as a value, use '-- --set'

Usage: shopt [OPTIONS] [OPTIONS]...

For more information, try '--help'.

try: command not found
date: invalid date ā€˜%d’
ERROR main: syntax error near token `
' (line 1 col 2)
bash13 command sub with inherit_errexit and command_sub_errexit

stdout:
zero
one
parent status=0
stderr:
bash: line 4: shopt: command_sub_errexit: invalid shell option name
mksh13 command sub with inherit_errexit and command_sub_errexit

stdout:
zero
one
parent status=0
stderr:
mksh: <stdin>[3]: shopt: not found
mksh: <stdin>[4]: shopt: not found
ksh13 command sub with inherit_errexit and command_sub_errexit

[ksh stdout] Expected 'zero\n', got 'zero\none\nparent status=0\n'
[ksh status] Expected 1, got 0

stdout:
zero
one
parent status=0
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
E: ksh: <stdin>[4]: shopt: inaccessible or not found
toysh13 command sub with inherit_errexit and command_sub_errexit

[toysh stdout] Expected 'zero\n', got 'zero\none two\nparent status=0\n'
[toysh status] Expected 1, got 0

stdout:
zero
one two
parent status=0
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush13 command sub with inherit_errexit and command_sub_errexit

[sush stdout] Expected 'zero\n', got 'zero\none two\nparent status=0\n'
[sush status] Expected 1, got 0

stdout:
zero
one two
parent status=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: inherit_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: shopt: command_sub_errexit: not supported yet
brush13 command sub with inherit_errexit and command_sub_errexit

[brush stdout] Expected 'zero\n', got 'zero\none two\nparent status=0\n'
[brush status] Expected 1, got 0

stdout:
zero
one two
parent status=0
stderr:
shopt: command_sub_errexit: invalid shell option name
mksh15 global assignment with command sub: middle command fails

stdout:
stderr: 
ksh15 global assignment with command sub: middle command fails

[ksh stdout] Expected 'one\ntwo\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
toysh16 global assignment with command sub: last command fails and it aborts

[toysh stdout] Expected u'', got 'status=0\n'
[toysh status] Expected 1, got 0

stdout:
status=0
stderr:
set: bad -o errexit
sush16 global assignment with command sub: last command fails and it aborts

[sush stdout] Expected u'', got 'status=1\n'
[sush status] Expected 1, got 0

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
brush16 global assignment with command sub: last command fails and it aborts

[brush stdout] Expected u'', got 'status=1\n'
[brush status] Expected 1, got 0

stdout:
status=1
stderr:
mksh17 local: middle command fails and keeps going

stdout:
good
status=0
one
stderr:
ksh17 local: middle command fails and keeps going

[ksh stdout] Expected 'good\nstatus=0\none two\n', got 'good\nstatus=0\none\n'

stdout:
good
status=0
one
stderr:
toysh17 local: middle command fails and keeps going

[toysh stdout] Expected 'good\nstatus=0\none two\n', got 'good\nstatus=0\none\n'

stdout:
good
status=0
one
stderr:
set: bad -o errexit
bash19 local and inherit_errexit / command_sub_errexit

stdout:
good
status=0
one
stderr:
bash: line 3: shopt: command_sub_errexit: invalid shell option name
mksh19 local and inherit_errexit / command_sub_errexit

stdout:
good
status=0
one
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[3]: shopt: not found
ksh19 local and inherit_errexit / command_sub_errexit

[ksh stdout] Expected 'good\n', got 'good\nstatus=0\none\n'
[ksh status] Expected 1, got 0

stdout:
good
status=0
one
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
E: ksh: <stdin>[3]: shopt: inaccessible or not found
toysh19 local and inherit_errexit / command_sub_errexit

[toysh stdout] Expected 'good\n', got 'good\nstatus=0\none\n'
[toysh status] Expected 1, got 0

stdout:
good
status=0
one
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush19 local and inherit_errexit / command_sub_errexit

[sush stdout] Expected 'good\n', got 'good\nstatus=0\none two\n'
[sush status] Expected 1, got 0

stdout:
good
status=0
one two
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: inherit_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: command_sub_errexit: not supported yet
brush19 local and inherit_errexit / command_sub_errexit

[brush stdout] Expected 'good\n', got 'good\nstatus=0\none two\n'
[brush status] Expected 1, got 0

stdout:
good
status=0
one two
stderr:
shopt: command_sub_errexit: invalid shell option name
sush20 global assignment when last status is failure

[sush stdout] Expected 'status=0\n', got 'status=1\n'

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
bash21 strict_errexit prevents errexit from being disabled in function

stdout:
fun
builtin ok
external ok
fun
stderr:
bash: line 6: shopt: strict_errexit: invalid shell option name
mksh21 strict_errexit prevents errexit from being disabled in function

stdout:
fun
builtin ok
external ok
fun
stderr:
mksh: <stdin>[6]: shopt: not found
ksh21 strict_errexit prevents errexit from being disabled in function

[ksh stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got 'fun\nbuiltin ok\nexternal ok\nfun\n'
[ksh status] Expected 1, got 0

stdout:
fun
builtin ok
external ok
fun
stderr:
E: ksh: <stdin>[6]: shopt: inaccessible or not found
toysh21 strict_errexit prevents errexit from being disabled in function

[toysh stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got 'fun\nbuiltin ok\nexternal ok\nfun\n'
[toysh status] Expected 1, got 0

stdout:
fun
builtin ok
external ok
fun
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sush21 strict_errexit prevents errexit from being disabled in function

[sush stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got 'fun\nbuiltin ok\nexternal ok\nfun\n'
[sush status] Expected 1, got 0

stdout:
fun
builtin ok
external ok
fun
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: shopt: strict_errexit: not supported yet
brush21 strict_errexit prevents errexit from being disabled in function

[brush stdout] Expected 'fun\nbuiltin ok\nexternal ok\n', got 'fun\nbuiltin ok\nexternal ok\nfun\n'
[brush status] Expected 1, got 0

stdout:
fun
builtin ok
external ok
fun
stderr:
shopt: strict_errexit: invalid shell option name
bash22 strict_errexit prevents errexit from being disabled in brace group

stdout:
foo
bar
foo
bar
stderr:
bash: line 4: shopt: strict_errexit: invalid shell option name
mksh22 strict_errexit prevents errexit from being disabled in brace group

stdout:
foo
bar
foo
bar
stderr:
mksh: <stdin>[4]: shopt: not found
ksh22 strict_errexit prevents errexit from being disabled in brace group

[ksh stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[ksh status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
E: ksh: <stdin>[4]: shopt: inaccessible or not found
toysh22 strict_errexit prevents errexit from being disabled in brace group

[toysh stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[toysh status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sush22 strict_errexit prevents errexit from being disabled in brace group

[sush stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[sush status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: shopt: strict_errexit: not supported yet
brush22 strict_errexit prevents errexit from being disabled in brace group

[brush stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[brush status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
shopt: strict_errexit: invalid shell option name
bash23 strict_errexit prevents errexit from being disabled in subshell

stdout:
foo
bar
foo
bar
stderr:
bash: line 6: shopt: strict_errexit: invalid shell option name
mksh23 strict_errexit prevents errexit from being disabled in subshell

stdout:
foo
bar
foo
bar
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[6]: shopt: not found
ksh23 strict_errexit prevents errexit from being disabled in subshell

[ksh stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[ksh status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
E: ksh: <stdin>[6]: shopt: inaccessible or not found
toysh23 strict_errexit prevents errexit from being disabled in subshell

[toysh stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[toysh status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush23 strict_errexit prevents errexit from being disabled in subshell

[sush stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[sush status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: inherit_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: shopt: strict_errexit: not supported yet
brush23 strict_errexit prevents errexit from being disabled in subshell

[brush stdout] Expected 'foo\nbar\n', got 'foo\nbar\nfoo\nbar\n'
[brush status] Expected 1, got 0

stdout:
foo
bar
foo
bar
stderr:
shopt: strict_errexit: invalid shell option name
bash24 strict_errexit and ! && || if while until

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
bash: line 2: shopt: strict_errexit: invalid shell option name
mksh24 strict_errexit and ! && || if while until

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
mksh: shopt: not found
ksh24 strict_errexit and ! && || if while until

[ksh stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n' Got 'fun\nshould not get here\nbang=0\n--\nfun\nor=0\n--\nfun\nand=0\n--\nfun\nif=0\n--\nfun\nwhile\nwhile=0\n--\nfun\nuntil=0\n--\n'

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
E: ksh: shopt: inaccessible or not found
E: ksh: shopt: inaccessible or not found
E: ksh: shopt: inaccessible or not found
E: ksh: shopt: inaccessible or not found
E: ksh: shopt: inaccessible or not found
E: ksh: shopt: inaccessible or not found
toysh24 strict_errexit and ! && || if while until

[toysh stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n' Got 'should not get here\nbang=0\n\nfun\nor=0\n\nfun\nand=0\n\nfun\nif=0\n\nfun\nwhile\nwhile=0\n\nfun\nuntil=0\n\n'

stdout:
should not get here
bang=0

fun
or=0

fun
and=0

fun
if=0

fun
while
while=0

fun
until=0

stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sh: fun: No such file or directory
set: bad -o errexit
sh: shopt: No such file or directory
set: bad -o errexit
sh: shopt: No such file or directory
set: bad -o errexit
sh: shopt: No such file or directory
set: bad -o errexit
sh: shopt: No such file or directory
set: bad -o errexit
sh: shopt: No such file or directory
sush24 strict_errexit and ! && || if while until

[sush stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n' Got 'fun\nshould not get here\nbang=0\n--\nfun\nor=0\n--\nfun\nand=0\n--\nfun\nif=0\n--\nfun\nwhile\nwhile=0\n--\nuntil=2\n--\n'

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
until=2
--
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: do
brush24 strict_errexit and ! && || if while until

[brush stdout] Expected 'bang=1\n--\nor=1\n--\nand=1\n--\nif=1\n--\nwhile=1\n--\nuntil=1\n--\n' Got 'fun\nshould not get here\nbang=0\n--\nfun\nor=0\n--\nfun\nand=0\n--\nfun\nif=0\n--\nfun\nwhile\nwhile=0\n--\nfun\nuntil=0\n--\n'

stdout:
fun
should not get here
bang=0
--
fun
or=0
--
fun
and=0
--
fun
if=0
--
fun
while
while=0
--
fun
until=0
--
stderr:
shopt: strict_errexit: invalid shell option name
shopt: strict_errexit: invalid shell option name
shopt: strict_errexit: invalid shell option name
shopt: strict_errexit: invalid shell option name
shopt: strict_errexit: invalid shell option name
shopt: strict_errexit: invalid shell option name
toysh26 errexit is silent (verbose_errexit for Oil)

[toysh stderr] Expected u'', got 'set: bad -e\n'

stdout:
stderr: 
set: bad -e
bash27 command sub errexit preserves exit code

stdout:
before

after
stderr:
bash: line 2: shopt: command_sub_errexit: invalid shell option name
mksh27 command sub errexit preserves exit code

stdout:
before

after
stderr:
mksh: <stdin>[2]: shopt: not found
ksh27 command sub errexit preserves exit code

[ksh stdout] Expected 'before\n', got 'before\n\nafter\n'
[ksh status] Expected 42, got 0

stdout:
before

after
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
toysh27 command sub errexit preserves exit code

[toysh stdout] Expected 'before\n', got 'before\n\nafter\n'
[toysh status] Expected 42, got 0

stdout:
before

after
stderr:
set: bad -e
sh: shopt: No such file or directory
brush27 command sub errexit preserves exit code

[brush stdout] Expected 'before\n', got 'before\n\nafter\n'
[brush status] Expected 42, got 0

stdout:
before

after
stderr:
shopt: command_sub_errexit: invalid shell option name
bash28 What's in strict:all?

stdout:
one
two
should not get here
stderr:
bash: line 2: shopt: strict:all: invalid shell option name
date: invalid date ā€˜%x’
mksh28 What's in strict:all?

stdout:
one
two
should not get here
stderr:
mksh: <stdin>[2]: shopt: not found
date: invalid date ā€˜%x’
ksh28 What's in strict:all?

[ksh stdout] Expected '', got 'one\ntwo\nshould not get here\n'
[ksh status] Expected 1, got 0

stdout:
one
two
should not get here
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
date: invalid date ā€˜%x’
toysh28 What's in strict:all?

[toysh stdout] Expected '', got 'failed\nshould not get here\n'
[toysh status] Expected 1, got 0

stdout:
failed
should not get here
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
date: invalid date ā€˜%x’
sh: deploy_func: No such file or directory
sush28 What's in strict:all?

[sush stdout] Expected '', got 'one\ntwo\nshould not get here\n'
[sush status] Expected 1, got 0

stdout:
one
two
should not get here
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: strict:all: not supported yet
date: invalid date ā€˜%x’
brush28 What's in strict:all?

[brush stdout] Expected '', got 'one\ntwo\nshould not get here\n'
[brush status] Expected 1, got 0

stdout:
one
two
should not get here
stderr:
shopt: strict:all: invalid shell option name
date: invalid date ā€˜%x’
bash29 command_sub_errexit causes local d=$(date %x) to fail

stdout:
hi
stderr:
bash: line 3: shopt: command_sub_errexit: invalid shell option name
date: invalid date ā€˜%x’
mksh29 command_sub_errexit causes local d=$(date %x) to fail

stdout:
hi
stderr:
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[3]: shopt: not found
date: invalid date ā€˜%x’
ksh29 command_sub_errexit causes local d=$(date %x) to fail

[ksh stdout] Expected '', got 'hi\n'
[ksh status] Expected 1, got 0

stdout:
hi
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
E: ksh: <stdin>[3]: shopt: inaccessible or not found
date: invalid date ā€˜%x’
toysh29 command_sub_errexit causes local d=$(date %x) to fail

[toysh stdout] Expected '', got 'hi\n'
[toysh status] Expected 1, got 0

stdout:
hi
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sh: shopt: No such file or directory
date: invalid date ā€˜%x’
sush29 command_sub_errexit causes local d=$(date %x) to fail

[sush stdout] Expected '', got 'hi\n'
[sush status] Expected 1, got 0

stdout:
hi
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: shopt: inherit_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: command_sub_errexit: not supported yet
date: invalid date ā€˜%x’
brush29 command_sub_errexit causes local d=$(date %x) to fail

[brush stdout] Expected '', got 'hi\n'
[brush status] Expected 1, got 0

stdout:
hi
stderr:
shopt: command_sub_errexit: invalid shell option name
date: invalid date ā€˜%x’
bash30 command_sub_errexit and command sub in array

stdout:
['one', '', 'two']
stderr:
bash: line 5: shopt: command_sub_errexit: invalid shell option name
date: invalid date ā€˜%x’
mksh30 command_sub_errexit and command sub in array

stdout:
stderr: 
toysh30 command_sub_errexit and command sub in array

[toysh status] Expected 1, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush30 command_sub_errexit and command sub in array

[sush stdout] Expected '', got "['one', '', 'two']\n"
[sush status] Expected 1, got 0

stdout:
['one', '', 'two']
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: shopt: inherit_errexit: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: shopt: command_sub_errexit: not supported yet
date: invalid date ā€˜%x’
brush30 command_sub_errexit and command sub in array

[brush stdout] Expected '', got "['one', '', 'two']\n"
[brush status] Expected 1, got 0

stdout:
['one', '', 'two']
stderr:
shopt: command_sub_errexit: invalid shell option name
date: invalid date ā€˜%x’
mksh31 OLD: command sub in conditional, with inherit_errexit

stdout:
1
A
done
stderr:
mksh: <stdin>[2]: shopt: not found
ksh31 OLD: command sub in conditional, with inherit_errexit

[ksh stdout] Expected '1 2\nA\ndone\n', got '1\nA\ndone\n'

stdout:
1
A
done
stderr:
E: ksh: <stdin>[2]: shopt: inaccessible or not found
bash33 Regression

stdout:
stderr: 
mksh33 Regression

stdout:
stderr: 
ksh33 Regression

[ksh stdout] Expected 'hi\np\n', got 'hi\n'
[ksh status] Expected 0, got 1

stdout:
hi
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
E: ksh: <stdin>[5]: shopt: inaccessible or not found
E: ksh: <stdin>[7]: syntax error: unexpected '}'
toysh33 Regression

[toysh stdout] Expected 'hi\np\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush33 Regression

[sush status] Expected 0, got 2

stdout:
hi
p
stderr:
sush: shopt: --: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
sush: shopt: --: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: proc: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: Unexpected token: }

sush: shopt: --: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 14: p: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 16: Unexpected token: }

brush33 Regression

[brush status] Expected 0, got 2

stdout:
hi
p
stderr:
error: unexpected argument '--set' found

  tip: to pass '--set' as a value, use '-- --set'

Usage: shopt [OPTIONS] [OPTIONS]...

For more information, try '--help'.

error: unexpected argument '--unset' found

  tip: to pass '--unset' as a value, use '-- --unset'

Usage: shopt [OPTIONS] [OPTIONS]...

For more information, try '--help'.

ERROR main: syntax error near token `
' (line 1 col 2)
proc: command not found
ERROR main: syntax error near token `
' (line 1 col 2)
error: unexpected argument '--unset' found

  tip: to pass '--unset' as a value, use '-- --unset'

Usage: shopt [OPTIONS] [OPTIONS]...

For more information, try '--help'.

p: command not found
ERROR main: syntax error near token `
' (line 1 col 2)
bash34 ShAssignment used as conditional

stdout:
yes
yes
yes
stderr:
bash: line 33: shopt: strict_errexit: invalid shell option name
mksh34 ShAssignment used as conditional

stdout:
yes
yes
yes
stderr:
mksh: <stdin>[33]: shopt: not found
ksh34 ShAssignment used as conditional

[ksh stdout] Expected 'yes\nyes\n', got 'yes\nyes\nyes\n'
[ksh status] Expected 1, got 0

stdout:
yes
yes
yes
stderr:
E: ksh: <stdin>[33]: shopt: inaccessible or not found
sush34 ShAssignment used as conditional

[sush stdout] Expected 'yes\nyes\n', got 'yes\nyes\nyes\n'
[sush status] Expected 1, got 0

stdout:
yes
yes
yes
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 16: set: errexit: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 33: shopt: strict_errexit: not supported yet
brush34 ShAssignment used as conditional

[brush stdout] Expected 'yes\nyes\n', got 'yes\nyes\nyes\n'
[brush status] Expected 1, got 0

stdout:
yes
yes
yes
stderr:
shopt: strict_errexit: invalid shell option name