Results for sh-options.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 26811121515672137
ok 10500500000
N-I 123001700001
BUG 0200000000
FAIL 0026250223332181
TIME 2122220000
total39393939393939393939
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0ok pass FAIL FAIL ok FAIL FAIL FAIL FAIL pass $- with -c
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
1ok N-I FAIL FAIL ok FAIL FAIL FAIL FAIL pass $- with pipefail
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
2pass N-I pass pass pass pass pass FAIL pass pass $- and more options
detailsdetails
3TIME TIME TIME TIME TIME TIME pass FAIL pass pass $- with interactive shell
detailsdetailsdetailsdetailsdetailsdetailsdetails
4pass pass pass pass pass pass pass pass pass pass pass short options like sh -e
5pass pass pass pass pass pass pass FAIL FAIL pass pass long options like sh -o errexit
detailsdetails
6pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass pass shopt options like sh -O nullglob
detailsdetailsdetailsdetailsdetailsdetailsdetails
7pass pass FAIL pass pass pass FAIL FAIL pass pass set -o vi/emacs
detailsdetailsdetails
8pass N-I FAIL FAIL N-I FAIL FAIL FAIL FAIL pass vi and emacs are mutually exclusive
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
9TIME N-I TIME TIME TIME TIME FAIL FAIL FAIL pass interactive shell starts with emacs mode on
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
10pass ok FAIL pass pass pass FAIL FAIL FAIL pass nounset
detailsdetailsdetailsdetailsdetails
11pass ok FAIL pass pass pass FAIL FAIL FAIL pass -u is nounset
detailsdetailsdetailsdetailsdetails
12pass pass pass pass pass pass FAIL FAIL pass FAIL -n for no execution (useful with --ast-output)
detailsdetailsdetails
13pass N-I pass pass pass pass FAIL pass FAIL pass pipefail
detailsdetailsdetails
14pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass shopt -p -o prints 'set' options
detailsdetailsdetailsdetailsdetailsdetailsdetails
15pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass shopt -o prints 'set' options
detailsdetailsdetailsdetailsdetailsdetailsdetails
16pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass shopt -p prints 'shopt' options
detailsdetailsdetailsdetailsdetailsdetailsdetails
17pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass shopt with no flags prints options
detailsdetailsdetailsdetailsdetailsdetailsdetails
18pass pass pass pass pass pass pass pass pass pass noclobber off
19pass ok pass pass pass pass FAIL FAIL pass pass noclobber on
detailsdetailsdetails
20pass N-I pass FAIL pass pass FAIL FAIL pass pass noclobber on <>
detailsdetailsdetailsdetails
21pass pass pass FAIL pass pass pass pass pass pass noclobber on >>
details
22pass BUG pass pass pass pass FAIL FAIL FAIL pass noclobber on &> >
detailsdetailsdetailsdetails
23pass BUG FAIL FAIL pass pass FAIL FAIL pass pass noclobber on &>> >>
detailsdetailsdetailsdetailsdetails
24pass ok FAIL FAIL ok FAIL FAIL pass pass pass set without args lists variables
detailsdetailsdetailsdetailsdetailsdetails
25ok N-I FAIL FAIL ok FAIL FAIL FAIL FAIL pass set without args and array variables
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
26pass N-I FAIL FAIL N-I FAIL FAIL pass pass N-I set without args and assoc array variables (not in OSH)
detailsdetailsdetailsdetailsdetailsdetailsdetails
27pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass shopt -q
detailsdetailsdetailsdetailsdetailsdetailsdetails
28ok N-I FAIL FAIL N-I FAIL FAIL FAIL FAIL pass shopt -q invalid
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
29N-I N-I FAIL FAIL N-I FAIL FAIL FAIL FAIL pass shopt -s strict:all
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
30pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass shopt allows for backward compatibility like bash
detailsdetailsdetailsdetailsdetailsdetailsdetails
31ok N-I FAIL FAIL N-I FAIL FAIL FAIL FAIL pass shopt -p validates option names
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
32ok N-I FAIL FAIL N-I FAIL FAIL FAIL FAIL pass shopt -p -o validates option names
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
33ok ok FAIL FAIL ok FAIL FAIL FAIL FAIL pass stubbed out bash options
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
34ok N-I FAIL FAIL N-I FAIL FAIL FAIL FAIL pass shopt -s nounset works in YSH, not in bash
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
35ok N-I FAIL FAIL N-I FAIL FAIL FAIL FAIL pass Unimplemented options - print, query, set, unset
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
36pass N-I FAIL FAIL N-I FAIL FAIL FAIL pass pass Unimplemented options - OSH shopt -s ignore_shopt_not_impl
detailsdetailsdetailsdetailsdetailsdetailsdetails
37pass N-I FAIL FAIL N-I FAIL FAIL pass pass pass shopt -p exit code (regression)
detailsdetailsdetailsdetailsdetailsdetails
38ok pass pass pass pass pass FAIL FAIL FAIL pass no-ops not shown by shopt -p
detailsdetailsdetailsdetails
158 passed, 20 OK, 42 not implemented, 2 BUG, 157 failed, 11 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

bash0 $- with -c

stdout:
huBc
stderr:
ash0 $- with -c

[ash stdout] Expected 'u\n' Got 'uc\n'

stdout:
uc
stderr:
zsh0 $- with -c

[zsh stdout] Expected 'u\n' Got '569Xu\n'

stdout:
569Xu
stderr:
mksh0 $- with -c

stdout:
uhc
stderr:
ksh0 $- with -c

[ksh stdout] Expected 'u\n' Got 'uhUc\n'

stdout:
uhUc
stderr:
toysh0 $- with -c

[toysh stdout] Expected 'u\n' Got ''
[toysh status] Expected 0 Got 1

stdout:
stderr: 
sh: Unknown option 'o' (see "sh --help")
sush0 $- with -c

[sush stdout] Expected 'u\n' Got ''
[sush status] Expected 0 Got 2

stdout:
stderr: 
: line : nounset: invalid option name
brush0 $- with -c

[brush stdout] Expected 'u\n' Got 'huB\n'

stdout:
huB
stderr:
bash1 $- with pipefail

stdout:
huBs
stderr:
dash1 $- with pipefail

stdout:
stderr: 
dash: 1: set: Illegal option -o pipefail
ash1 $- with pipefail

[ash stdout] Expected 'u\n' Got 'us\n'

stdout:
us
stderr:
zsh1 $- with pipefail

[zsh stdout] Expected 'u\n' Got '569Xsu\n'

stdout:
569Xsu
stderr:
mksh1 $- with pipefail

stdout:
ush
stderr:
ksh1 $- with pipefail

[ksh stdout] Expected 'u\n' Got 'ushU\n'

stdout:
ushU
stderr:
toysh1 $- with pipefail

[toysh stdout] Expected 'u\n' Got 'Bs\n'

stdout:
Bs
stderr:
set: bad -o pipefail
sush1 $- with pipefail

[sush stdout] Expected 'u\n' Got 'Bh\n'

stdout:
Bh
stderr:
brush1 $- with pipefail

[brush stdout] Expected 'u\n' Got 'huBs\n'

stdout:
huBs
stderr:
dash2 $- and more options

stdout:
stderr: 
dash: 3: [[: not found
sush2 $- and more options

[sush stdout] Expected 'yes\nyes\nyes\nyes\n' Got ''
[sush status] Expected 0 Got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -f: invalid option
sush3 $- with interactive shell

[sush stdout] Expected 'FALSE\nTRUE\n' Got 'FALSE\n'
[sush status] Expected 0 Got 1

stdout:
FALSE
stderr:
: line : set: -i: invalid option
sush5 pass long options like sh -o errexit

[sush status] Expected 1 Got 2

stdout:
stderr: 
: line : errexit: invalid option name
brush5 pass long options like sh -o errexit

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

stdout:
status=1
stderr:
dash6 pass shopt options like sh -O nullglob

stdout:
stderr: 
dash: 0: Illegal option -O
dash: 0: Illegal option -O
ash6 pass shopt options like sh -O nullglob

[ash stdout] Expected 'foo *.nonexistent bar\nfoo bar\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: illegal option +O
ash: illegal option -O
zsh6 pass shopt options like sh -O nullglob

[zsh stdout] Expected 'foo *.nonexistent bar\nfoo bar\n' Got ''
[zsh status] Expected 0 Got 127

stdout:
stderr: 
zsh: can't open input file: nullglob
zsh: can't open input file: nullglob
mksh6 pass shopt options like sh -O nullglob

stdout:
stderr: 
mksh: mksh: -O: unknown option
mksh: mksh: -O: unknown option
ksh6 pass shopt options like sh -O nullglob

[ksh stdout] Expected 'foo *.nonexistent bar\nfoo bar\n' Got ''
[ksh status] Expected 0 Got 1

stdout:
stderr: 
E: ksh: -O: unknown option
E: ksh: -O: unknown option
toysh6 pass shopt options like sh -O nullglob

[toysh stdout] Expected 'foo *.nonexistent bar\nfoo bar\n' Got ''
[toysh status] Expected 0 Got 1

stdout:
stderr: 
sh: +O: No such file or directory
sh: Unknown option 'O' (see "sh --help")
sush6 pass shopt options like sh -O nullglob

[sush stdout] Expected 'foo *.nonexistent bar\nfoo bar\n' Got ''
[sush status] Expected 0 Got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: nullglob: No such file or directory
: line : set: -O: invalid option
ash7 set -o vi/emacs

[ash stdout] Expected '0\n0\n' Got '0\n1\n'

stdout:
0
1
stderr:
ash: set: line 3: illegal option -o emacs
toysh7 set -o vi/emacs

[toysh stdout] Expected '0\n0\n' Got '1\n1\n'

stdout:
1
1
stderr:
set: bad -o vi
set: bad -o emacs
sush7 set -o vi/emacs

[sush stdout] Expected '0\n0\n' Got '2\n2\n'

stdout:
2
2
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: vi: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: emacs: invalid option name
dash8 vi and emacs are mutually exclusive

stdout:
___
___
___
stderr:
dash: 2: shopt: not found
dash: 2: shopt: not found
dash: 2: shopt: not found
ash8 vi and emacs are mutually exclusive

[ash stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n' Got '___\n___\n___\n'

stdout:
___
___
___
stderr:
ash: shopt: not found
ash: set: line 7: illegal option -o emacs
ash: shopt: not found
ash: shopt: not found
zsh8 vi and emacs are mutually exclusive

[zsh stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n' Got '___\n___\n___\n'

stdout:
___
___
___
stderr:
show:1: command not found: shopt
show:1: command not found: shopt
show:1: command not found: shopt
mksh8 vi and emacs are mutually exclusive

stdout:
___
___
___
stderr:
mksh: <stdin>[5]: shopt: not found
mksh: <stdin>[8]: shopt: not found
mksh: <stdin>[11]: shopt: not found
ksh8 vi and emacs are mutually exclusive

[ksh stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n' Got '___\n___\n___\n'

stdout:
___
___
___
stderr:
E: ksh: <stdin>[5]: shopt: inaccessible or not found
E: ksh: <stdin>[8]: shopt: inaccessible or not found
E: ksh: <stdin>[11]: shopt: inaccessible or not found
toysh8 vi and emacs are mutually exclusive

[toysh stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n' Got '___\n___\n___\n'

stdout:
___
___
___
stderr:
sh: shopt: No such file or directory
set: bad -o emacs
sh: shopt: No such file or directory
set: bad -o vi
sh: shopt: No such file or directory
sush8 vi and emacs are mutually exclusive

[sush stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n' Got '___\n___\n___\n'

stdout:
___
___
___
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: set: emacs: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: set: vi: invalid option name
brush8 vi and emacs are mutually exclusive

[brush stdout] Expected 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset +o emacs\nset -o vi\n___\n' Got 'set +o emacs\nset +o vi\n___\nset -o emacs\nset +o vi\n___\nset -o emacs\nset -o vi\n___\n'

stdout:
set +o emacs
set +o vi
___
set -o emacs
set +o vi
___
set -o emacs
set -o vi
___
stderr:
dash9 interactive shell starts with emacs mode on

stdout:
stderr: 
toysh9 interactive shell starts with emacs mode on

[toysh stdout] Expected 'non-interactive\n1\n1\ninteractive\n0\n1\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush9 interactive shell starts with emacs mode on

[sush stdout] Expected 'non-interactive\n1\n1\ninteractive\n0\n1\n' Got 'non-interactive\n2\n2\ninteractive\n'
[sush status] Expected 0 Got 2

stdout:
non-interactive
2
2
interactive
stderr:
test: ‘-o’: unary operator expected
test: ‘-o’: unary operator expected
: line : set: -i: invalid option
brush9 interactive shell starts with emacs mode on

[brush stdout] Expected 'non-interactive\n1\n1\ninteractive\n0\n1\n' Got 'non-interactive\n1\n1\ninteractive\n0\n0\n'

stdout:
non-interactive
1
1
interactive
0
0
stderr:
dash10 nounset

stdout:
[]
stderr:
dash: 3: unset: parameter not set
ash10 nounset

[ash status] Expected 1 Got 2

stdout:
[]
stderr:
ash: unset: parameter not set
toysh10 nounset

[toysh stdout] Expected '[]\n' Got '[]\n[]\nend\n'
[toysh status] Expected 1 Got 0

stdout:
[]
[]
end
stderr:
set: bad -o nounset
sush10 nounset

[sush stdout] Expected '[]\n' Got '[]\n[]\nend\n'
[sush status] Expected 1 Got 0

stdout:
[]
[]
end
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: nounset: invalid option name
brush10 nounset

[brush stdout] Expected '[]\n' Got '[]\n[]\nend\n'
[brush status] Expected 1 Got 0

stdout:
[]
[]
end
stderr:
dash11 -u is nounset

stdout:
[]
stderr:
dash: 3: unset: parameter not set
ash11 -u is nounset

[ash status] Expected 1 Got 2

stdout:
[]
stderr:
ash: unset: parameter not set
toysh11 -u is nounset

[toysh stdout] Expected '[]\n' Got '[]\nend\n'
[toysh status] Expected 1 Got 0

stdout:
[]
end
stderr:
main: line 3: sh: unset]": bad substitution
sush11 -u is nounset

[sush stdout] Expected '[]\n' Got '[]\nend\n'
[sush status] Expected 1 Got 0

stdout:
[]
end
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: unset: unbound variable
brush11 -u is nounset

[brush stdout] Expected '[]\n' Got '[]\n[]\nend\n'
[brush status] Expected 1 Got 0

stdout:
[]
[]
end
stderr:
toysh12 -n for no execution (useful with --ast-output)

[toysh stdout] Expected '1\n' Got '1\n2\n3\n'

stdout:
1
2
3
stderr:
set: bad -n
set: bad -n
sush12 -n for no execution (useful with --ast-output)

[sush stdout] Expected '1\n' Got '1\n2\n3\n'

stdout:
1
2
3
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: -n: invalid option
osh12 -n for no execution (useful with --ast-output)

[osh stdout] Expected '1\n' Got '1\n2\n3\n'

stdout:
1
2
3
stderr:
dash13 pipefail

stdout:
0
stderr:
dash: 3: set: Illegal option -o pipefail
toysh13 pipefail

[toysh stdout] Expected '0\n2\n' Got '0\n0\n'

stdout:
0
0
stderr:
set: bad -o pipefail
brush13 pipefail

[brush stdout] Expected '0\n2\n' Got '0\n0\n'

stdout:
0
0
stderr:
dash14 shopt -p -o prints 'set' options

stdout:
stderr: 
ash14 shopt -p -o prints 'set' options

[ash stdout] Expected 'set +o nounset\nset -o nounset\n--\nerrexit\nnoglob\nnounset\n' Got '--\n'
[ash status] Expected 0 Got 1

stdout:
--
stderr:
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
zsh14 shopt -p -o prints 'set' options

[zsh stdout] Expected 'set +o nounset\nset -o nounset\n--\nerrexit\nnoglob\nnounset\n' Got '--\n'
[zsh status] Expected 0 Got 1

stdout:
--
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
mksh14 shopt -p -o prints 'set' options

stdout:
stderr: 
ksh14 shopt -p -o prints 'set' options

[ksh stdout] Expected 'set +o nounset\nset -o nounset\n--\nerrexit\nnoglob\nnounset\n' Got '--\n'
[ksh status] Expected 0 Got 1

stdout:
--
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
E: ksh: <stdin>[5]: shopt: inaccessible or not found
E: ksh: <stdin>[9]: shopt: inaccessible or not found
toysh14 shopt -p -o prints 'set' options

[toysh stdout] Expected 'set +o nounset\nset -o nounset\n--\nerrexit\nnoglob\nnounset\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush14 shopt -p -o prints 'set' options

[sush stdout] Expected 'set +o nounset\nset -o nounset\n--\nerrexit\nnoglob\nnounset\n' Got '--\nnoglob\n'

stdout:
--
noglob
stderr:
sush: shopt: nounset: invalid shell option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: set: nounset: invalid option name
sush: shopt: nounset: invalid shell option name
dash15 shopt -o prints 'set' options

stdout:
stderr: 
ash15 shopt -o prints 'set' options

[ash stdout] Expected 'errexit\nnoglob\nnounset\n--\n' Got '--\n'

stdout:
--
stderr:
ash: shopt: not found
zsh15 shopt -o prints 'set' options

[zsh stdout] Expected 'errexit\nnoglob\nnounset\n--\n' Got '--\n'

stdout:
--
stderr:
zsh: command not found: shopt
mksh15 shopt -o prints 'set' options

stdout:
stderr: 
ksh15 shopt -o prints 'set' options

[ksh stdout] Expected 'errexit\nnoglob\nnounset\n--\n' Got '--\n'

stdout:
--
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
toysh15 shopt -o prints 'set' options

[toysh stdout] Expected 'errexit\nnoglob\nnounset\n--\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush15 shopt -o prints 'set' options

[sush stdout] Expected 'errexit\nnoglob\nnounset\n--\n' Got '--\n'

stdout:
--
stderr:
dash16 shopt -p prints 'shopt' options

stdout:
stderr: 
dash: 1: shopt: not found
dash: 2: shopt: not found
dash: 3: shopt: not found
ash16 shopt -p prints 'shopt' options

[ash stdout] Expected 'shopt -u nullglob\nshopt -s nullglob\n' Got ''
[ash status] Expected 0 Got 127

stdout:
stderr: 
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
zsh16 shopt -p prints 'shopt' options

[zsh stdout] Expected 'shopt -u nullglob\nshopt -s nullglob\n' Got ''
[zsh status] Expected 0 Got 127

stdout:
stderr: 
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
mksh16 shopt -p prints 'shopt' options

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[2]: shopt: not found
mksh: <stdin>[3]: shopt: not found
ksh16 shopt -p prints 'shopt' options

[ksh stdout] Expected 'shopt -u nullglob\nshopt -s nullglob\n' Got ''
[ksh status] Expected 0 Got 127

stdout:
stderr: 
E: ksh: <stdin>[1]: shopt: inaccessible or not found
E: ksh: <stdin>[2]: shopt: inaccessible or not found
E: ksh: <stdin>[3]: shopt: inaccessible or not found
toysh16 shopt -p prints 'shopt' options

[toysh stdout] Expected 'shopt -u nullglob\nshopt -s nullglob\n' Got ''
[toysh status] Expected 0 Got 127

stdout:
stderr: 
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush16 shopt -p prints 'shopt' options

[sush stdout] Expected 'shopt -u nullglob\nshopt -s nullglob\n' Got 'nullglob off\nnullglob on\n'

stdout:
nullglob        off
nullglob        on
stderr:
dash17 shopt with no flags prints options

stdout:
0 one.txt
0
stderr:
dash: 3: shopt: not found
dash: 8: shopt: not found
ash17 shopt with no flags prints options

[ash stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n' Got '0 one.txt\n0\n'

stdout:
0 one.txt
0
stderr:
ash: shopt: not found
ash: shopt: not found
zsh17 shopt with no flags prints options

[zsh stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n' Got '0 one.txt\n0\n'

stdout:
0 one.txt
0
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
mksh17 shopt with no flags prints options

stdout:
0 one.txt
0
stderr:
mksh: <stdin>[3]: shopt: not found
mksh: <stdin>[8]: shopt: not found
ksh17 shopt with no flags prints options

[ksh stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n' Got '0 one.txt\n0\n'

stdout:
0 one.txt
0
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
E: ksh: <stdin>[8]: shopt: inaccessible or not found
toysh17 shopt with no flags prints options

[toysh stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n' Got '0 one.txt\n0\n'

stdout:
0 one.txt
0
stderr:
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush17 shopt with no flags prints options

[sush stdout] Expected '2 one.txt\nnullglob\nfailglob\n1\n' Got '0 one.txt\n1\n'

stdout:
0 one.txt
1
stderr:
sush: shopt: nullglob: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
dash19 noclobber on

stdout:
create=0
overwrite=2
force=0
force
stderr:
dash: 7: cannot create no-clobber: File exists
toysh19 noclobber on

[toysh stdout] Expected 'create=0\noverwrite=1\nforce=0\nforce\n' Got 'create=0\noverwrite=0\nforce=0\nforce\n'

stdout:
create=0
overwrite=0
force=0
force
stderr:
sush19 noclobber on

[sush stdout] Expected 'create=0\noverwrite=1\nforce=0\nforce\n' Got 'create=0\noverwrite=1\nforce=2\nfoo\n'

stdout:
create=0
overwrite=1
force=2
foo
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: no-clobber: cannot overwrite existing file
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: syntax error near unexpected token: >|
dash20 noclobber on <>

stdout:
.oo
stderr:
dash: 4: read: Illegal option -n
zsh20 noclobber on <>

[zsh stdout] Expected 'f.o\n' Got 'foo\n.'

stdout:
foo
.
stderr:
toysh20 noclobber on <>

[toysh stdout] Expected 'f.o\n' Got '.oo\n'

stdout:
.oo
stderr:
sh: read: No such file or directory
sush20 noclobber on <>

[sush stdout] Expected 'f.o\n' Got ''
[sush status] Expected 0 Got -6

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: syntax error near unexpected token: >|
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: syntax error near unexpected token: <>
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: 0: bad file descriptor
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 1: bad file descriptor

thread 'main' panicked at src/elements/io.rs:17:27:
cannot close: EBADF
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh21 noclobber on >>

[zsh stdout] Expected 'status=0\nfoo\n' Got 'status=1\n'
[zsh status] Expected 0 Got 1

stdout:
status=1
stderr:
zsh: no such file or directory: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/21-zsh/no-clobber
cat: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/21-zsh/no-clobber: No such file or directory
dash22 noclobber on &> >

stdout:
stderr: 
toysh22 noclobber on &> >

[toysh stdout] Expected 'stdout=0\nagain=1\nfoo\nboth=0\nagain=1\nbaz\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush22 noclobber on &> >

[sush stdout] Expected 'stdout=0\nagain=1\nfoo\nboth=0\nagain=1\nbaz\n' Got 'stdout=0\nagain=1\nfoo\nboth=0\nagain=0\nfoo\n'

stdout:
stdout=0
again=1
foo
both=0
again=0
foo
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/22-sush/no-clobber: cannot overwrite existing file
brush22 noclobber on &> >

[brush stdout] Expected 'stdout=0\nagain=1\nfoo\nboth=0\nagain=1\nbaz\n' Got 'stdout=0\nagain=1\nfoo\nboth=0\nagain=0\nfoo\n'

stdout:
stdout=0
again=1
foo
both=0
again=0
foo
stderr:
error: failed to redirect to /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/22-brush/no-clobber: File exists (os error 17)
dash23 noclobber on &>> >>

stdout:
stdout=0
again=0
foo
bar
both=0
baz
again=0
foo
stderr:
ash23 noclobber on &>> >>

[ash stdout] Expected 'stdout=0\nagain=0\nfoo\nbar\nboth=0\nagain=0\nbaz\nfoo\n' Got 'stdout=0\nagain=0\nfoo\nbar\n'
[ash status] Expected 0 Got 2

stdout:
stdout=0
again=0
foo
bar
stderr:
ash: syntax error: unexpected redirection
zsh23 noclobber on &>> >>

[zsh stdout] Expected 'stdout=0\nagain=0\nfoo\nbar\nboth=0\nagain=0\nbaz\nfoo\n' Got 'stdout=1\nagain=1\nboth=1\nagain=1\n'
[zsh status] Expected 0 Got 1

stdout:
stdout=1
again=1
both=1
again=1
stderr:
zsh: no such file or directory: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-zsh/no-clobber
zsh: no such file or directory: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-zsh/no-clobber
cat: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-zsh/no-clobber: No such file or directory
zsh: no such file or directory: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-zsh/no-clobber
zsh: no such file or directory: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-zsh/no-clobber
cat: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-zsh/no-clobber: No such file or directory
toysh23 noclobber on &>> >>

[toysh stdout] Expected 'stdout=0\nagain=0\nfoo\nbar\nboth=0\nagain=0\nbaz\nfoo\n' Got 'stdout=0\nagain=0\nfoo\nbar\nboth=0\nagain=0\nfoo\n'

stdout:
stdout=0
again=0
foo
bar
both=0
again=0
foo
stderr:
sush23 noclobber on &>> >>

[sush stdout] Expected 'stdout=0\nagain=0\nfoo\nbar\nboth=0\nagain=0\nbaz\nfoo\n' Got 'stdout=0\nagain=1\nfoo\nbaz\nboth=0\nfoo\nagain=0\n'
[sush status] Expected 0 Got 1

stdout:
stdout=0
again=1
foo
baz
both=0
foo
again=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-sush/no-clobber: cannot overwrite existing file
793638
793643
cat: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/sh-options.test.sh/23-sush/no-clobber: No such file or directory
dash24 set without args lists variables

stdout:
__GLOBAL='mutated'
__OTHERLOCAL='L'
__mylocal='L'
__var_in_parent_scope='D'
stderr:
ash24 set without args lists variables

[ash stdout] Expected '__GLOBAL=mutated\n__OTHERLOCAL=L\n__mylocal=L\n__var_in_parent_scope=D\n' Got "__GLOBAL='mutated'\n__OTHERLOCAL='L'\n__mylocal='L'\n__var_in_parent_scope='D'\n"

stdout:
__GLOBAL='mutated'
__OTHERLOCAL='L'
__mylocal='L'
__var_in_parent_scope='D'
stderr:
zsh24 set without args lists variables

[zsh stdout] Expected '__GLOBAL=mutated\n__OTHERLOCAL=L\n__mylocal=L\n__var_in_parent_scope=D\n' Got ''

stdout:
stderr: 
grep: (standard input): binary file matches
mksh24 set without args lists variables

stdout:
__GLOBAL=mutated
__var_in_parent_scope=D
__OTHERLOCAL=L
__mylocal=L
stderr:
ksh24 set without args lists variables

[ksh stdout] Expected '__GLOBAL=mutated\n__OTHERLOCAL=L\n__mylocal=L\n__var_in_parent_scope=D\n' Got '__GLOBAL=mutated\n__var_in_parent_scope=D\n__OTHERLOCAL=L\n__mylocal=L\n'

stdout:
__GLOBAL=mutated
__var_in_parent_scope=D
__OTHERLOCAL=L
__mylocal=L
stderr:
toysh24 set without args lists variables

[toysh stdout] Expected '__GLOBAL=mutated\n__OTHERLOCAL=L\n__mylocal=L\n__var_in_parent_scope=D\n' Got '__OTHERLOCAL=L\n__mylocal=L\n__var_in_parent_scope=D\n__GLOBAL=mutated\n'

stdout:
__OTHERLOCAL=L
__mylocal=L
__var_in_parent_scope=D
__GLOBAL=mutated
stderr:
bash25 set without args and array variables

stdout:
__array=([0]="1" [1]="2" [2]="3 4")
stderr:
dash25 set without args and array variables

stdout:
stderr: 
dash: 1: declare: not found
dash: 2: Syntax error: "(" unexpected
ash25 set without args and array variables

[ash stdout] Expected "__array=(1 2 '3 4')\n" Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: declare: not found
ash: syntax error: unexpected "("
zsh25 set without args and array variables

[zsh stdout] Expected 'a=( 1 2 3 )\n' Got ''

stdout:
stderr: 
grep: (standard input): binary file matches
mksh25 set without args and array variables

stdout:
__array[0]=1
__array[1]=2
__array[2]='3 4'
stderr:
mksh: <stdin>[1]: declare: not found
ksh25 set without args and array variables

[ksh stdout] Expected "__array=(1 2 '3 4')\n" Got "__array[0]=1\n__array[1]=2\n__array[2]='3 4'\n"

stdout:
__array[0]=1
__array[1]=2
__array[2]='3 4'
stderr:
E: ksh: <stdin>[1]: declare: inaccessible or not found
toysh25 set without args and array variables

[toysh stdout] Expected "__array=(1 2 '3 4')\n" Got ''
[toysh status] Expected 0 Got 2

stdout:
stderr: 
main: line 2: sh: syntax error: 1
sush25 set without args and array variables

[sush stdout] Expected "__array=(1 2 '3 4')\n" Got '__array=([0]="1" [1]="2" [2]="3 4")\n'

stdout:
__array=([0]="1" [1]="2" [2]="3 4")
stderr:
brush25 set without args and array variables

[brush stdout] Expected "__array=(1 2 '3 4')\n" Got '__array=([0]="1" [1]="2" [2]="3 4")\n'

stdout:
__array=([0]="1" [1]="2" [2]="3 4")
stderr:
dash26 set without args and assoc array variables (not in OSH)

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: __assoc[k e y]=v a l: not found
dash: 3: __assoc[a]=b: not found
ash26 set without args and assoc array variables (not in OSH)

[ash stdout] Expected '__assoc=([a]="b" ["k e y"]="v a l" )\n' Got ''
[ash status] Expected 0 Got 1

stdout:
stderr: 
ash: typeset: not found
ash: __assoc[k e y]=v a l: not found
ash: __assoc[a]=b: not found
zsh26 set without args and assoc array variables (not in OSH)

[zsh stdout] Expected '__assoc=([a]="b" ["k e y"]="v a l" )\n' Got ''

stdout:
stderr: 
grep: (standard input): binary file matches
mksh26 set without args and assoc array variables (not in OSH)

stdout:
stderr: 
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[2]: 'k e y': multi-character character constant
ksh26 set without args and assoc array variables (not in OSH)

[ksh stdout] Expected '__assoc=([a]="b" ["k e y"]="v a l" )\n' Got ''
[ksh status] Expected 0 Got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: typeset: -A: unknown option
W: ksh: <stdin>[2]: 'k e y': multi-character character constant
toysh26 set without args and assoc array variables (not in OSH)

[toysh stdout] Expected '__assoc=([a]="b" ["k e y"]="v a l" )\n' Got ''
[toysh status] Expected 0 Got 1

stdout:
stderr: 
sh: typeset: No such file or directory
sh: __assoc[k e y]=v a l: No such file or directory
sh: __assoc[a]=b: No such file or directory
osh26 set without args and assoc array variables (not in OSH)

stdout:
stderr: 
  __assoc[a]=b
  ^~~~~~~~
[ stdin ]:3: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)
dash27 shopt -q

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
dash: 1: shopt: not found
dash: 4: shopt: not found
dash: 6: shopt: not found
dash: 9: shopt: not found
dash: 12: shopt: not found
dash: 13: shopt: not found
ash27 shopt -q

[ash stdout] Expected 'nullglob=1\nnullglob=0\nnullglob,failglob=1\nnullglob,failglob=0\n' Got 'nullglob=127\nnullglob=127\nnullglob,failglob=127\nnullglob,failglob=127\n'

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
zsh27 shopt -q

[zsh stdout] Expected 'nullglob=1\nnullglob=0\nnullglob,failglob=1\nnullglob,failglob=0\n' Got 'nullglob=127\nnullglob=127\nnullglob,failglob=127\nnullglob,failglob=127\n'

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
mksh27 shopt -q

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[4]: shopt: not found
mksh: <stdin>[6]: shopt: not found
mksh: <stdin>[9]: shopt: not found
mksh: <stdin>[12]: shopt: not found
mksh: <stdin>[13]: shopt: not found
ksh27 shopt -q

[ksh stdout] Expected 'nullglob=1\nnullglob=0\nnullglob,failglob=1\nnullglob,failglob=0\n' Got 'nullglob=127\nnullglob=127\nnullglob,failglob=127\nnullglob,failglob=127\n'

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
E: ksh: <stdin>[4]: shopt: inaccessible or not found
E: ksh: <stdin>[6]: shopt: inaccessible or not found
E: ksh: <stdin>[9]: shopt: inaccessible or not found
E: ksh: <stdin>[12]: shopt: inaccessible or not found
E: ksh: <stdin>[13]: shopt: inaccessible or not found
toysh27 shopt -q

[toysh stdout] Expected 'nullglob=1\nnullglob=0\nnullglob,failglob=1\nnullglob,failglob=0\n' Got 'nullglob=127\nnullglob=127\nnullglob,failglob=127\nnullglob,failglob=127\n'

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush27 shopt -q

[sush stdout] Expected 'nullglob=1\nnullglob=0\nnullglob,failglob=1\nnullglob,failglob=0\n' Got 'nullglob=0\nnullglob=0\nnullglob,failglob=1\nnullglob,failglob=1\n'

stdout:
nullglob=0
nullglob=0
nullglob,failglob=1
nullglob,failglob=1
stderr:
sush: shopt: nullglob: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: shopt: failglob: not supported yet
sush: shopt: nullglob: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
bash28 shopt -q invalid

stdout:
invalidZZ=1
stderr:
bash: line 1: shopt: invalidZZ: invalid shell option name
dash28 shopt -q invalid

stdout:
invalidZZ=127
stderr:
dash: 1: shopt: not found
ash28 shopt -q invalid

[ash stdout] Expected 'invalidZZ=2\n' Got 'invalidZZ=127\n'

stdout:
invalidZZ=127
stderr:
ash: shopt: not found
zsh28 shopt -q invalid

[zsh stdout] Expected 'invalidZZ=2\n' Got 'invalidZZ=127\n'

stdout:
invalidZZ=127
stderr:
zsh: command not found: shopt
mksh28 shopt -q invalid

stdout:
invalidZZ=127
stderr:
mksh: <stdin>[1]: shopt: not found
ksh28 shopt -q invalid

[ksh stdout] Expected 'invalidZZ=2\n' Got 'invalidZZ=127\n'

stdout:
invalidZZ=127
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
toysh28 shopt -q invalid

[toysh stdout] Expected 'invalidZZ=2\n' Got 'invalidZZ=127\n'

stdout:
invalidZZ=127
stderr:
sh: shopt: No such file or directory
sush28 shopt -q invalid

[sush stdout] Expected 'invalidZZ=2\n' Got 'invalidZZ=0\n'

stdout:
invalidZZ=0
stderr:
brush28 shopt -q invalid

[brush stdout] Expected 'invalidZZ=2\n' Got 'invalidZZ=1\n'

stdout:
invalidZZ=1
stderr:
shopt: invalidZZ: invalid shell option name
bash29 shopt -s strict:all

stdout:
-
-
-
stderr:
bash: line 9: shopt: strict:all: invalid shell option name
bash: line 11: shopt: strict_argv: invalid shell option name
dash29 shopt -s strict:all

stdout:
stderr: 
dash: 3: Syntax error: Bad function name
ash29 shopt -s strict:all

[ash stdout] Expected 'shopt -u strict_arg_parse\nshopt -u strict_argv\n-\nshopt -s strict_arg_parse\nshopt -s strict_argv\n-\nshopt -s strict_arg_parse\nshopt -u strict_argv\n-\n' Got ''
[ash status] Expected 0 Got 2

stdout:
stderr: 
ash: syntax error: bad function name
zsh29 shopt -s strict:all

[zsh stdout] Expected 'shopt -u strict_arg_parse\nshopt -u strict_argv\n-\nshopt -s strict_arg_parse\nshopt -s strict_argv\n-\nshopt -s strict_arg_parse\nshopt -u strict_argv\n-\n' Got '\n\n\n'

stdout:


stderr:
show-strict:1: command not found: shopt
zsh: command not found: shopt
show-strict:1: command not found: shopt
zsh: command not found: shopt
show-strict:1: command not found: shopt
mksh29 shopt -s strict:all

stdout:
-
-
-
stderr:
mksh: <stdin>[8]: shopt: not found
mksh: <stdin>[9]: shopt: not found
mksh: <stdin>[10]: shopt: not found
mksh: <stdin>[11]: shopt: not found
mksh: <stdin>[12]: shopt: not found
ksh29 shopt -s strict:all

[ksh stdout] Expected 'shopt -u strict_arg_parse\nshopt -u strict_argv\n-\nshopt -s strict_arg_parse\nshopt -s strict_argv\n-\nshopt -s strict_arg_parse\nshopt -u strict_argv\n-\n' Got '-\n-\n-\n'

stdout:
-
-
-
stderr:
E: ksh: <stdin>[8]: shopt: inaccessible or not found
E: ksh: <stdin>[9]: shopt: inaccessible or not found
E: ksh: <stdin>[10]: shopt: inaccessible or not found
E: ksh: <stdin>[11]: shopt: inaccessible or not found
E: ksh: <stdin>[12]: shopt: inaccessible or not found
toysh29 shopt -s strict:all

[toysh stdout] Expected 'shopt -u strict_arg_parse\nshopt -u strict_argv\n-\nshopt -s strict_arg_parse\nshopt -s strict_argv\n-\nshopt -s strict_arg_parse\nshopt -u strict_argv\n-\n' Got '-\n-\n-\n'

stdout:
-
-
-
stderr:
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush29 shopt -s strict:all

[sush stdout] Expected 'shopt -u strict_arg_parse\nshopt -u strict_argv\n-\nshopt -s strict_arg_parse\nshopt -s strict_argv\n-\nshopt -s strict_arg_parse\nshopt -u strict_argv\n-\n' Got '-\n'
[sush status] Expected 0 Got 127

stdout:
-
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: syntax error near unexpected token: ()
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: syntax error near unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: show-strict: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: shopt: strict:all: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 10: show-strict: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 11: strict_argv: invalid option name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: show-strict: command not found
brush29 shopt -s strict:all

[brush stdout] Expected 'shopt -u strict_arg_parse\nshopt -u strict_argv\n-\nshopt -s strict_arg_parse\nshopt -s strict_argv\n-\nshopt -s strict_arg_parse\nshopt -u strict_argv\n-\n' Got '-\n-\n-\n'

stdout:
-
-
-
stderr:
shopt: strict:all: invalid shell option name
shopt: strict_argv: invalid shell option name
dash30 shopt allows for backward compatibility like bash

stdout:
status=0
stderr:
dash: 3: shopt: not found
dash: 8: shopt: not found
ash30 shopt allows for backward compatibility like bash

[ash stdout] Expected 'shopt -u nullglob\nstatus=0\nshopt -s nullglob\n' Got 'status=0\n'

stdout:
status=0
stderr:
ash: shopt: not found
ash: shopt: not found
zsh30 shopt allows for backward compatibility like bash

[zsh stdout] Expected 'shopt -u nullglob\nstatus=0\nshopt -s nullglob\n' Got 'status=0\n'

stdout:
status=0
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
mksh30 shopt allows for backward compatibility like bash

stdout:
status=0
stderr:
mksh: <stdin>[3]: shopt: not found
mksh: <stdin>[8]: shopt: not found
ksh30 shopt allows for backward compatibility like bash

[ksh stdout] Expected 'shopt -u nullglob\nstatus=0\nshopt -s nullglob\n' Got 'status=0\n'

stdout:
status=0
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
E: ksh: <stdin>[8]: shopt: inaccessible or not found
toysh30 shopt allows for backward compatibility like bash

[toysh stdout] Expected 'shopt -u nullglob\nstatus=0\nshopt -s nullglob\n' Got 'status=0\n'

stdout:
status=0
stderr:
set: bad -o errexit
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush30 shopt allows for backward compatibility like bash

[sush stdout] Expected 'shopt -u nullglob\nstatus=0\nshopt -s nullglob\n' Got 'nullglob off\nstatus=0\nnullglob on\n'

stdout:
nullglob        off
status=0
nullglob        on
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: errexit: invalid option name
bash31 shopt -p validates option names

stdout:
shopt -u nullglob
shopt -u failglob
status=1
nullglob off
failglob off
status=1
stderr:
bash: line 1: shopt: invalid: invalid shell option name
bash: line 3: shopt: invalid: invalid shell option name
dash31 shopt -p validates option names

stdout:
status=127
status=127
stderr:
dash: 1: shopt: not found
dash: 3: shopt: not found
ash31 shopt -p validates option names

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

stdout:
status=127
status=127
stderr:
ash: shopt: not found
ash: shopt: not found
zsh31 shopt -p validates option names

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

stdout:
status=127
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
zsh: read-only variable: status
mksh31 shopt -p validates option names

stdout:
status=127
status=127
stderr:
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[3]: shopt: not found
ksh31 shopt -p validates option names

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

stdout:
status=127
status=127
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
E: ksh: <stdin>[3]: shopt: inaccessible or not found
toysh31 shopt -p validates option names

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

stdout:
status=127
status=127
stderr:
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush31 shopt -p validates option names

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

stdout:
status=1
status=1
stderr:
sush: shopt: nullglob: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
sush: shopt: nullglob: invalid shell option name
shopt: usage: shopt [-su] [optname ...]
brush31 shopt -p validates option names

[brush stdout] Expected 'status=2\nstatus=2\n' Got 'shopt -u nullglob\nshopt -u failglob\nstatus=1\nnullglob off\nfailglob off\nstatus=0\n'

stdout:
shopt -u nullglob
shopt -u failglob
status=1
nullglob off
failglob off
status=0
stderr:
shopt: invalid: invalid shell option name
shopt: invalid: invalid shell option name
bash32 shopt -p -o validates option names

stdout:
set +o errexit
set +o nounset
status=1
stderr:
bash: line 1: shopt: invalid: invalid option name
dash32 shopt -p -o validates option names

stdout:
status=127
stderr:
dash: 1: shopt: not found
ash32 shopt -p -o validates option names

[ash stdout] Expected 'set +o errexit\nstatus=2\n' Got 'status=127\n'

stdout:
status=127
stderr:
ash: shopt: not found
zsh32 shopt -p -o validates option names

[zsh stdout] Expected 'set +o errexit\nstatus=2\n' Got 'status=127\n'

stdout:
status=127
stderr:
zsh: command not found: shopt
mksh32 shopt -p -o validates option names

stdout:
status=127
stderr:
mksh: <stdin>[1]: shopt: not found
ksh32 shopt -p -o validates option names

[ksh stdout] Expected 'set +o errexit\nstatus=2\n' Got 'status=127\n'

stdout:
status=127
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
toysh32 shopt -p -o validates option names

[toysh stdout] Expected 'set +o errexit\nstatus=2\n' Got 'status=127\n'

stdout:
status=127
stderr:
sh: shopt: No such file or directory
sush32 shopt -p -o validates option names

[sush stdout] Expected 'set +o errexit\nstatus=2\n' Got 'status=0\n'

stdout:
status=0
stderr:
sush: shopt: errexit: invalid shell option name
brush32 shopt -p -o validates option names

[brush stdout] Expected 'set +o errexit\nstatus=2\n' Got 'set +o errexit\nset +o nounset\nstatus=1\n'

stdout:
set +o errexit
set +o nounset
status=1
stderr:
shopt: invalid: invalid shell option name
bash33 stubbed out bash options

stdout:
1
0
0
0
stderr:
bash: line 1: shopt: ignore_shopt_not_impl: invalid shell option name
bash: line 3: shopt: foo: invalid shell option name
dash33 stubbed out bash options

stdout:
127
127
127
127
stderr:
dash: 1: shopt: not found
dash: 3: shopt: not found
dash: 3: shopt: not found
dash: 3: shopt: not found
dash: 3: shopt: not found
ash33 stubbed out bash options

[ash stdout] Expected '2\n0\n0\n0\n' Got '127\n127\n127\n127\n'

stdout:
127
127
127
127
stderr:
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
zsh33 stubbed out bash options

[zsh stdout] Expected '2\n0\n0\n0\n' Got '127\n127\n127\n127\n'

stdout:
127
127
127
127
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
mksh33 stubbed out bash options

stdout:
127
127
127
127
stderr:
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[5]: shopt: not found
mksh: <stdin>[5]: shopt: not found
mksh: <stdin>[5]: shopt: not found
mksh: <stdin>[5]: shopt: not found
ksh33 stubbed out bash options

[ksh stdout] Expected '2\n0\n0\n0\n' Got '127\n127\n127\n127\n'

stdout:
127
127
127
127
stderr:
E: ksh: <stdin>[1]: shopt: inaccessible or not found
E: ksh: <stdin>[5]: shopt: inaccessible or not found
E: ksh: <stdin>[5]: shopt: inaccessible or not found
E: ksh: <stdin>[5]: shopt: inaccessible or not found
E: ksh: <stdin>[5]: shopt: inaccessible or not found
toysh33 stubbed out bash options

[toysh stdout] Expected '2\n0\n0\n0\n' Got '127\n127\n127\n127\n'

stdout:
127
127
127
127
stderr:
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sh: shopt: No such file or directory
sush33 stubbed out bash options

[sush stdout] Expected '2\n0\n0\n0\n' Got '1\n1\n1\n1\n'

stdout:
1
1
1
1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: ignore_shopt_not_impl: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: foo: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: autocd: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: cdable_vars: not supported yet
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: checkwinsize: not supported yet
brush33 stubbed out bash options

[brush stdout] Expected '2\n0\n0\n0\n' Got '1\n0\n0\n0\n'

stdout:
1
0
0
0
stderr:
shopt: ignore_shopt_not_impl: invalid shell option name
shopt: foo: invalid shell option name
bash34 shopt -s nounset works in YSH, not in bash

stdout:
status=1
nounset off
stderr:
bash: line 7: shopt: nounset: invalid shell option name
dash34 shopt -s nounset works in YSH, not in bash

stdout:
N-I
stderr:
ash34 shopt -s nounset works in YSH, not in bash

[ash stdout] Expected 'status=0\nset -o nounset\n' Got 'status=127\nnounset off\n'

stdout:
status=127
nounset off
stderr:
ash: shopt: not found
zsh34 shopt -s nounset works in YSH, not in bash

[zsh stdout] Expected 'status=0\nset -o nounset\n' Got 'status=127\nnounset off\n'

stdout:
status=127
nounset off
stderr:
zsh: command not found: shopt
mksh34 shopt -s nounset works in YSH, not in bash

stdout:
N-I
stderr:
ksh34 shopt -s nounset works in YSH, not in bash

[ksh stdout] Expected 'status=0\nset -o nounset\n' Got 'status=127\nbgnice off inherit-xtrace on noclobber off nounset off sh off vi-esccomplete off\n'

stdout:
status=127
bgnice off inherit-xtrace on noclobber off nounset off sh off vi-esccomplete off
stderr:
E: ksh: <stdin>[7]: shopt: inaccessible or not found
toysh34 shopt -s nounset works in YSH, not in bash

[toysh stdout] Expected 'status=0\nset -o nounset\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush34 shopt -s nounset works in YSH, not in bash

[sush stdout] Expected 'status=0\nset -o nounset\n' Got 'status=1\n'

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: shopt: nounset: not supported yet
brush34 shopt -s nounset works in YSH, not in bash

[brush stdout] Expected 'status=0\nset -o nounset\n' Got 'status=1\nnounset off\n'

stdout:
status=1
nounset off
stderr:
shopt: nounset: invalid shell option name
bash35 Unimplemented options - print, query, set, unset

stdout:
shopt -u xpg_echo
q=1
shopt -s xpg_echo
shopt -u xpg_echo
p=1
noflag=1
set=1
stderr:
dash35 Unimplemented options - print, query, set, unset

stdout:
stderr: 
ash35 Unimplemented options - print, query, set, unset

[ash stdout] Expected 'q=2\np=2\nnoflag=2\nset=1\n' Got 'q=127\np=127\nnoflag=127\nset=127\n'

stdout:
q=127
p=127
noflag=127
set=127
stderr:
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
zsh35 Unimplemented options - print, query, set, unset

[zsh stdout] Expected 'q=2\np=2\nnoflag=2\nset=1\n' Got 'q=127\np=127\nnoflag=127\nset=127\n'

stdout:
q=127
p=127
noflag=127
set=127
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
mksh35 Unimplemented options - print, query, set, unset

stdout:
stderr: 
ksh35 Unimplemented options - print, query, set, unset

[ksh stdout] Expected 'q=2\np=2\nnoflag=2\nset=1\n' Got 'q=127\np=127\nnoflag=127\nset=127\n'

stdout:
q=127
p=127
noflag=127
set=127
stderr:
E: ksh: <stdin>[5]: shopt: inaccessible or not found
E: ksh: <stdin>[6]: shopt: inaccessible or not found
E: ksh: <stdin>[8]: shopt: inaccessible or not found
E: ksh: <stdin>[9]: shopt: inaccessible or not found
E: ksh: <stdin>[11]: shopt: inaccessible or not found
E: ksh: <stdin>[12]: shopt: inaccessible or not found
E: ksh: <stdin>[15]: shopt: inaccessible or not found
E: ksh: <stdin>[18]: shopt: inaccessible or not found
toysh35 Unimplemented options - print, query, set, unset

[toysh stdout] Expected 'q=2\np=2\nnoflag=2\nset=1\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush35 Unimplemented options - print, query, set, unset

[sush stdout] Expected 'q=2\np=2\nnoflag=2\nset=1\n' Got 'xpg_echo off\nq=0\nxpg_echo on\nxpg_echo off\np=0\nnoflag=0\nset=1\n'

stdout:
xpg_echo        off
q=0
xpg_echo        on
xpg_echo        off
p=0
noflag=0
set=1
stderr:
sush: shopt: errexit: invalid shell option name
brush35 Unimplemented options - print, query, set, unset

[brush stdout] Expected 'q=2\np=2\nnoflag=2\nset=1\n' Got 'shopt -u xpg_echo\nq=1\nshopt -s xpg_echo\nshopt -u xpg_echo\np=1\nnoflag=1\nset=1\n'

stdout:
shopt -u xpg_echo
q=1
shopt -s xpg_echo
shopt -u xpg_echo
p=1
noflag=1
set=1
stderr:
dash36 Unimplemented options - OSH shopt -s ignore_shopt_not_impl

stdout:
stderr: 
ash36 Unimplemented options - OSH shopt -s ignore_shopt_not_impl

[ash stdout] Expected 'shopt -u xpg_echo\nq=1\nshopt -s xpg_echo\nshopt -u xpg_echo\np=1\nnoflag=1\nset=1\n' Got 'q=127\np=127\nnoflag=127\nset=127\n'

stdout:
q=127
p=127
noflag=127
set=127
stderr:
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
ash: shopt: not found
zsh36 Unimplemented options - OSH shopt -s ignore_shopt_not_impl

[zsh stdout] Expected 'shopt -u xpg_echo\nq=1\nshopt -s xpg_echo\nshopt -u xpg_echo\np=1\nnoflag=1\nset=1\n' Got 'q=127\np=127\nnoflag=127\nset=127\n'

stdout:
q=127
p=127
noflag=127
set=127
stderr:
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
zsh: command not found: shopt
mksh36 Unimplemented options - OSH shopt -s ignore_shopt_not_impl

stdout:
stderr: 
ksh36 Unimplemented options - OSH shopt -s ignore_shopt_not_impl

[ksh stdout] Expected 'shopt -u xpg_echo\nq=1\nshopt -s xpg_echo\nshopt -u xpg_echo\np=1\nnoflag=1\nset=1\n' Got 'q=127\np=127\nnoflag=127\nset=127\n'

stdout:
q=127
p=127
noflag=127
set=127
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
E: ksh: <stdin>[7]: shopt: inaccessible or not found
E: ksh: <stdin>[8]: shopt: inaccessible or not found
E: ksh: <stdin>[10]: shopt: inaccessible or not found
E: ksh: <stdin>[11]: shopt: inaccessible or not found
E: ksh: <stdin>[13]: shopt: inaccessible or not found
E: ksh: <stdin>[14]: shopt: inaccessible or not found
E: ksh: <stdin>[17]: shopt: inaccessible or not found
E: ksh: <stdin>[20]: shopt: inaccessible or not found
toysh36 Unimplemented options - OSH shopt -s ignore_shopt_not_impl

[toysh stdout] Expected 'shopt -u xpg_echo\nq=1\nshopt -s xpg_echo\nshopt -u xpg_echo\np=1\nnoflag=1\nset=1\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush36 Unimplemented options - OSH shopt -s ignore_shopt_not_impl

[sush stdout] Expected 'shopt -u xpg_echo\nq=1\nshopt -s xpg_echo\nshopt -u xpg_echo\np=1\nnoflag=1\nset=1\n' Got 'xpg_echo off\nq=0\nxpg_echo on\nxpg_echo off\np=0\nnoflag=0\nset=1\n'

stdout:
xpg_echo        off
q=0
xpg_echo        on
xpg_echo        off
p=0
noflag=0
set=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: shopt: ignore_shopt_not_impl: not supported yet
sush: shopt: errexit: invalid shell option name
dash37 shopt -p exit code (regression)

stdout:
stderr: 
ash37 shopt -p exit code (regression)

[ash stdout] Expected 'status=0\n' Got 'status=127\n'

stdout:
status=127
stderr:
ash: shopt: not found
zsh37 shopt -p exit code (regression)

[zsh stdout] Expected 'status=0\n' Got 'status=127\n'

stdout:
status=127
stderr:
zsh: command not found: shopt
mksh37 shopt -p exit code (regression)

stdout:
stderr: 
ksh37 shopt -p exit code (regression)

[ksh stdout] Expected 'status=0\n' Got 'status=127\n'

stdout:
status=127
stderr:
E: ksh: <stdin>[3]: shopt: inaccessible or not found
toysh37 shopt -p exit code (regression)

[toysh stdout] Expected 'status=0\n' Got ''
[toysh status] Expected 0 Got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
bash38 no-ops not shown by shopt -p

stdout:
shopt -u xpg_echo
--
stderr:
toysh38 no-ops not shown by shopt -p

[toysh stdout] Expected '--\n' Got '\n'

stdout:
stderr: 
sh: shopt: No such file or directory
sush38 no-ops not shown by shopt -p

[sush stdout] Expected '--\n' Got 'xpg_echo off\n--\n'

stdout:
xpg_echo        off
--
stderr:
brush38 no-ops not shown by shopt -p

[brush stdout] Expected '--\n' Got 'shopt -u xpg_echo\n--\n'

stdout:
shopt -u xpg_echo
--
stderr: