Results for builtin-getopts.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 221820121717013721
ok 1430400000
BUG 1210300000
FAIL 00012072411173
total24242424242424242424
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass FAIL pass pass FAIL pass pass pass getopts empty
detailsdetails
1pass pass pass pass pass pass FAIL FAIL FAIL pass getopts sees unknown arg
detailsdetailsdetails
2pass pass pass FAIL pass pass FAIL pass FAIL pass getopts three invocations
detailsdetailsdetails
3pass pass pass pass pass pass FAIL pass FAIL pass getopts resets OPTARG
detailsdetails
4pass pass pass pass pass pass FAIL pass FAIL pass Basic getopts invocation
detailsdetails
5ok pass pass FAIL ok FAIL FAIL FAIL FAIL pass getopts with invalid variable name
detailsdetailsdetailsdetailsdetailsdetailsdetails
6pass pass pass FAIL pass pass FAIL FAIL FAIL pass getopts with invalid flag
detailsdetailsdetailsdetails
7pass pass pass pass pass pass FAIL pass pass pass getopts with with -
details
8pass pass pass FAIL pass pass FAIL FAIL FAIL pass getopts missing required argument
detailsdetailsdetailsdetails
9pass pass pass pass pass pass FAIL pass pass pass getopts doesn't look for flags after args
details
10pass pass pass pass pass pass FAIL pass FAIL pass getopts with explicit args
detailsdetails
11pass pass pass pass pass pass FAIL pass pass pass OPTIND
details
12pass pass pass FAIL BUG FAIL FAIL FAIL FAIL FAIL OPTIND after multiple getopts with same spec
detailsdetailsdetailsdetailsdetailsdetailsdetails
13pass BUG BUG FAIL BUG FAIL FAIL FAIL FAIL FAIL OPTIND after multiple getopts with different spec
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
14BUG pass pass FAIL BUG FAIL FAIL FAIL FAIL FAIL OPTIND narrowed down
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
15pass pass pass FAIL pass pass FAIL pass FAIL pass Getopts parses the function's arguments
detailsdetailsdetails
16pass pass pass FAIL pass pass FAIL pass pass pass Local OPTIND
detailsdetails
17pass ok ok FAIL ok FAIL FAIL pass pass pass two flags: -ab
detailsdetailsdetailsdetailsdetailsdetails
18pass BUG pass FAIL pass pass FAIL FAIL FAIL pass flag and arg: -c10
detailsdetailsdetailsdetailsdetails
19pass ok ok pass ok FAIL FAIL pass pass pass More Smooshing 1
detailsdetailsdetailsdetailsdetails
20pass ok ok pass ok FAIL FAIL FAIL FAIL pass More Smooshing 2
detailsdetailsdetailsdetailsdetailsdetailsdetails
21pass ok pass pass pass pass FAIL pass FAIL pass OPTIND should be >= 1 (regression)
detailsdetailsdetails
22pass pass pass pass pass pass FAIL FAIL FAIL pass getopts bug #1523
detailsdetailsdetails
23pass pass pass pass pass pass FAIL FAIL FAIL pass More regression for #1523
detailsdetailsdetails
147 passed, 12 OK, 0 not implemented, 7 BUG, 74 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

zsh0 getopts empty

[zsh stdout] Expected 'status=1 opt=? OPTARG=\n', got 'status=1 opt= OPTARG=\n'

stdout:
status=1 opt= OPTARG=
stderr:
toysh0 getopts empty

[toysh stdout] Expected 'status=1 opt=? OPTARG=\n', got 'status=127 opt= OPTARG=\n'

stdout:
status=127 opt= OPTARG=
stderr:
set: bad --
sh: getopts: No such file or directory
toysh1 getopts sees unknown arg

[toysh stdout] Expected 'status=0 opt=? OPTARG=\n', got 'status=127 opt= OPTARG=\n'

stdout:
status=127 opt= OPTARG=
stderr:
set: bad --
sh: getopts: No such file or directory
sush1 getopts sees unknown arg

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

stdout:
status=1 opt=? OPTARG=
stderr:
brush1 getopts sees unknown arg

[brush stdout] Expected 'status=0 opt=? OPTARG=\n', got 'status=1 opt=? OPTARG=\n'

stdout:
status=1 opt=? OPTARG=
stderr:
zsh2 getopts three invocations

[zsh stdout] Expected 'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=?\n' Got 'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=c\n'

stdout:
status=0 opt=h
status=0 opt=c
status=1 opt=c
stderr:
toysh2 getopts three invocations

[toysh stdout] Expected 'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=?\n' Got 'status=127 opt=\nstatus=127 opt=\nstatus=127 opt=\n'

stdout:
status=127 opt=
status=127 opt=
status=127 opt=
stderr:
set: bad --
sh: getopts: No such file or directory
sh: getopts: No such file or directory
sh: getopts: No such file or directory
brush2 getopts three invocations

[brush stdout] Expected 'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=?\n' Got 'status=1 opt=?\nstatus=1 opt=?\nstatus=1 opt=?\n'

stdout:
status=1 opt=?
status=1 opt=?
status=1 opt=?
stderr:
toysh3 getopts resets OPTARG

[toysh stdout] Expected 'status=0 opt=c OPTARG=foo\nstatus=0 opt=h OPTARG=\n' Got 'status=127 opt= OPTARG=\nstatus=127 opt= OPTARG=\n'

stdout:
status=127 opt= OPTARG=
status=127 opt= OPTARG=
stderr:
set: bad --
sh: getopts: No such file or directory
sh: getopts: No such file or directory
brush3 getopts resets OPTARG

[brush stdout] Expected 'status=0 opt=c OPTARG=foo\nstatus=0 opt=h OPTARG=\n' Got 'status=1 opt=? OPTARG=\nstatus=1 opt=? OPTARG=\n'

stdout:
status=1 opt=? OPTARG=
status=1 opt=? OPTARG=
stderr:
toysh4 Basic getopts invocation

[toysh stdout] Expected 'h=1 c=foo optind=4 argv=x y z\n', got 'h=0 c= optind= argv=\n'

stdout:
h=0 c= optind= argv=
stderr:
set: bad --
sh: getopts: No such file or directory
brush4 Basic getopts invocation

[brush stdout] Expected 'h=1 c=foo optind=4 argv=x y z\n', got 'h=0 c= optind=1 argv=-h -c foo x y z\n'

stdout:
h=0 c= optind=1 argv=-h -c foo x y z
stderr:
bash5 getopts with invalid variable name

stdout:
status=1 opt= OPTARG=foo OPTIND=3
stderr:
bash: line 2: getopts: `opt-': not a valid identifier
zsh5 getopts with invalid variable name

[zsh stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: not an identifier: opt-
mksh5 getopts with invalid variable name

stdout:
status=1 opt= OPTARG= OPTIND=1
stderr:
mksh: <stdin>[2]: getopts: opt-: is not an identifier
ksh5 getopts with invalid variable name

[ksh stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=1 opt= OPTARG= OPTIND=1\n'

stdout:
status=1 opt= OPTARG= OPTIND=1
stderr:
E: ksh: <stdin>[2]: getopts: opt-: not an identifier
toysh5 getopts with invalid variable name

[toysh stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=127 opt= OPTARG= OPTIND=\n'

stdout:
status=127 opt= OPTARG= OPTIND=
stderr:
set: bad --
sh: getopts: No such file or directory
sush5 getopts with invalid variable name

[sush stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=1 opt= OPTARG=foo OPTIND=3\n'

stdout:
status=1 opt= OPTARG=foo OPTIND=3
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: getopts: VariableInvalid("opt-")
brush5 getopts with invalid variable name

[brush stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=1 opt= OPTARG= OPTIND=1\n'

stdout:
status=1 opt= OPTARG= OPTIND=1
stderr:
zsh6 getopts with invalid flag

[zsh stdout] Expected 'ERROR 3\n', got 'ERROR 2\n'

stdout:
ERROR 2
stderr:
zsh: bad option: -x
toysh6 getopts with invalid flag

[toysh stdout] Expected 'ERROR 3\n', got 'status=0\n'
[toysh status] Expected 2, got 0

stdout:
status=0
stderr:
set: bad --
sh: getopts: No such file or directory
sush6 getopts with invalid flag

[sush stdout] Expected 'ERROR 3\n', got 'status=0\n'
[sush status] Expected 2, got 0

stdout:
status=0
stderr:
brush6 getopts with invalid flag

[brush stdout] Expected 'ERROR 3\n', got 'status=0\n'
[brush status] Expected 2, got 0

stdout:
status=0
stderr:
toysh7 getopts with with -

[toysh stdout] Expected '-h -\nstatus=0\n', got '\nstatus=0\n'

stdout:
status=0
stderr:
set: bad --
sh: getopts: No such file or directory
zsh8 getopts missing required argument

[zsh stdout] Expected 'ERROR 3\n', got 'status=0\n'
[zsh status] Expected 2, got 0

stdout:
status=0
stderr:
zsh: argument expected after -c option
toysh8 getopts missing required argument

[toysh stdout] Expected 'ERROR 3\n', got 'status=0\n'
[toysh status] Expected 2, got 0

stdout:
status=0
stderr:
set: bad --
sh: getopts: No such file or directory
sush8 getopts missing required argument

[sush stdout] Expected 'ERROR 3\n', got 'status=0\n'
[sush status] Expected 2, got 0

stdout:
status=0
stderr:
brush8 getopts missing required argument

[brush stdout] Expected 'ERROR 3\n', got 'status=0\n'
[brush status] Expected 2, got 0

stdout:
status=0
stderr:
toysh9 getopts doesn't look for flags after args

[toysh stdout] Expected 'h=0 c= optind=1 argv=x -h -c y\n', got 'h=0 c= optind= argv=\n'

stdout:
h=0 c= optind= argv=
stderr:
set: bad --
sh: getopts: No such file or directory
toysh10 getopts with explicit args

[toysh stdout] Expected 'h=1 c=foo optind=4 argv=A B C\n', got 'h=0 c= optind= argv=\n'

stdout:
h=0 c= optind= argv=
stderr:
set: bad --
sh: getopts: No such file or directory
brush10 getopts with explicit args

[brush stdout] Expected 'h=1 c=foo optind=4 argv=A B C\n', got 'h=0 c= optind=1 argv=A B C\n'

stdout:
h=0 c= optind=1 argv=A B C
stderr:
Parse command options

Usage: getopts <OPTIONS_STRING> <VARIABLE_NAME> [ARGS]...

Arguments:
  <OPTIONS_STRING>  Specification for options
  <VARIABLE_NAME>   Name of variable to receive next option
  [ARGS]...         Arguments to parse

Options:
  -h, --help  Print help

toysh11 OPTIND

[toysh stdout] Expected '1\n', got '\n'

stdout:
stderr: 
zsh12 OPTIND after multiple getopts with same spec

[zsh stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=1\n\n\nOPTIND=4\nOPTIND=4\n'

stdout:
OPTIND=1


OPTIND=4
OPTIND=4
stderr:
mksh12 OPTIND after multiple getopts with same spec

stdout:
OPTIND=1
-
-
OPTIND=4
OPTIND=4
stderr:
mksh: <stdin>[15]: getopts: arguments changed since last call
ksh12 OPTIND after multiple getopts with same spec

[ksh stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=4\n'

stdout:
OPTIND=1
-
-
OPTIND=4
OPTIND=4
stderr:
E: ksh: <stdin>[15]: getopts: arguments changed since last call
toysh12 OPTIND after multiple getopts with same spec

[toysh stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=\nOPTIND=\nOPTIND=\n'

stdout:
OPTIND=
OPTIND=
OPTIND=
stderr:
sh: getopts: No such file or directory
set: bad --
sh: getopts: No such file or directory
set: bad --
sh: getopts: No such file or directory
sush12 OPTIND after multiple getopts with same spec

[sush stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=4\n'

stdout:
OPTIND=1
-
-
OPTIND=4
OPTIND=4
stderr:
brush12 OPTIND after multiple getopts with same spec

[brush stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=1\nOPTIND=1\nOPTIND=1\n'

stdout:
OPTIND=1
OPTIND=1
OPTIND=1
stderr:
osh12 OPTIND after multiple getopts with same spec

[osh stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=4\n'

stdout:
OPTIND=1
-
-
OPTIND=4
OPTIND=4
stderr:
dash13 OPTIND after multiple getopts with different spec

stdout:
.
OPTIND=2
-
-
-
OPTIND=5
_
OPTIND=2
stderr:
No arg for -f option
ash13 OPTIND after multiple getopts with different spec

stdout:
.
OPTIND=2
-
-
-
OPTIND=5
_
OPTIND=2
stderr:
No arg for -f option
zsh13 OPTIND after multiple getopts with different spec

[zsh stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got '.\nOPTIND=2\n\n\nOPTIND=5\nOPTIND=5\n'

stdout:
.
OPTIND=2


OPTIND=5
OPTIND=5
stderr:
mksh13 OPTIND after multiple getopts with different spec

stdout:
.
OPTIND=2
-
-
OPTIND=5
OPTIND=5
stderr:
mksh: <stdin>[16]: getopts: arguments changed since last call
ksh13 OPTIND after multiple getopts with different spec

[ksh stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=5\n'

stdout:
.
OPTIND=2
-
-
OPTIND=5
OPTIND=5
stderr:
E: ksh: <stdin>[16]: getopts: arguments changed since last call
toysh13 OPTIND after multiple getopts with different spec

[toysh stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got 'OPTIND=\nOPTIND=\nOPTIND=\n'

stdout:
OPTIND=
OPTIND=
OPTIND=
stderr:
set: bad --
sh: getopts: No such file or directory
set: bad --
sh: getopts: No such file or directory
set: bad --
sh: getopts: No such file or directory
sush13 OPTIND after multiple getopts with different spec

[sush stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=5\n'

stdout:
.
OPTIND=2
-
-
OPTIND=5
OPTIND=5
stderr:
brush13 OPTIND after multiple getopts with different spec

[brush stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got 'OPTIND=1\nOPTIND=1\nOPTIND=1\n'

stdout:
OPTIND=1
OPTIND=1
OPTIND=1
stderr:
osh13 OPTIND after multiple getopts with different spec

[osh stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=5\n'

stdout:
.
OPTIND=2
-
-
OPTIND=5
OPTIND=5
stderr:
bash14 OPTIND narrowed down

stdout:
a=1 b= c= d=1 e=E
stderr:
zsh14 OPTIND narrowed down

[zsh stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a=1 b= c= d=1 e=E\n'

stdout:
a=1 b= c= d=1 e=E
stderr:
mksh14 OPTIND narrowed down

stdout:
a=1 b= c= d=1 e=E
stderr:
ksh14 OPTIND narrowed down

[ksh stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a=1 b= c= d=1 e=E\n'

stdout:
a=1 b= c= d=1 e=E
stderr:
toysh14 OPTIND narrowed down

[toysh stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a= b= c= d= e=\n'

stdout:
a= b= c= d= e=
stderr:
set: bad --
sh: getopts: No such file or directory
set: bad --
sh: getopts: No such file or directory
sush14 OPTIND narrowed down

[sush stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a=1 b= c= d=1 e=E\n'

stdout:
a=1 b= c= d=1 e=E
stderr:
brush14 OPTIND narrowed down

[brush stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a= b= c= d= e=\n'

stdout:
a= b= c= d= e=
stderr:
osh14 OPTIND narrowed down

[osh stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a=1 b= c= d=1 e=E\n'

stdout:
a=1 b= c= d=1 e=E
stderr:
zsh15 Getopts parses the function's arguments

[zsh stdout] Expected 'h=0 c=bar opt=? optind=3 argv=-h -c foo x y z\n' Got 'h=0 c=bar opt=c optind=1 argv=-h -c foo x y z\n'

stdout:
h=0 c=bar opt=c optind=1 argv=-h -c foo x y z
stderr:
toysh15 Getopts parses the function's arguments

[toysh stdout] Expected 'h=0 c=bar opt=? optind=3 argv=-h -c foo x y z\n' Got 'h=0 c= opt= optind= argv=\n'

stdout:
h=0 c= opt= optind= argv=
stderr:
set: bad --
sh: getopts: No such file or directory
brush15 Getopts parses the function's arguments

[brush stdout] Expected 'h=0 c=bar opt=? optind=3 argv=-h -c foo x y z\n' Got 'h=0 c= opt=? optind=1 argv=-h -c foo x y z\n'

stdout:
h=0 c= opt=? optind=1 argv=-h -c foo x y z
stderr:
zsh16 Local OPTIND

[zsh stdout] Expected 'loop 2\n', got 'loop 1\n'

stdout:
loop 1
stderr:
toysh16 Local OPTIND

[toysh stdout] Expected 'loop 2\n', got ''

stdout:
stderr: 
sh: getopts: No such file or directory
dash17 two flags: -ab

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
stderr:
ash17 two flags: -ab

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
stderr:
zsh17 two flags: -ab

[zsh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\n' Got 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\n'

stdout:
OPTIND=1 opt=a OPTARG=
OPTIND=1 opt=b OPTARG=
stderr:
mksh17 two flags: -ab

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
stderr:
ksh17 two flags: -ab

[ksh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\n' Got 'OPTIND=2 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\n'

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
stderr:
toysh17 two flags: -ab

[toysh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n'

stdout:
OPTIND= opt= OPTARG=
OPTIND= opt= OPTARG=
stderr:
sh: getopts: No such file or directory
sh: getopts: No such file or directory
dash18 flag and arg: -c10

stdout:
OPTIND=2 opt=c OPTARG=10
OPTIND=2 opt=? OPTARG=10
stderr:
zsh18 flag and arg: -c10

[zsh stdout] Expected 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=? OPTARG=\n' Got 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=c OPTARG=10\n'

stdout:
OPTIND=2 opt=c OPTARG=10
OPTIND=2 opt=c OPTARG=10
stderr:
toysh18 flag and arg: -c10

[toysh stdout] Expected 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=? OPTARG=\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n'

stdout:
OPTIND= opt= OPTARG=
OPTIND= opt= OPTARG=
stderr:
sh: getopts: No such file or directory
sh: getopts: No such file or directory
sush18 flag and arg: -c10

[sush stdout] Expected 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=? OPTARG=\n' Got 'OPTIND=1 opt=? OPTARG=\nOPTIND=1 opt=? OPTARG=\n'

stdout:
OPTIND=1 opt=? OPTARG=
OPTIND=1 opt=? OPTARG=
stderr:
brush18 flag and arg: -c10

[brush stdout] Expected 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=? OPTARG=\n' Got 'OPTIND=1 opt=? OPTARG=\nOPTIND=1 opt=? OPTARG=\n'

stdout:
OPTIND=1 opt=? OPTARG=
OPTIND=1 opt=? OPTARG=
stderr:
getopts: illegal option -- c
getopts: illegal option -- 1
dash19 More Smooshing 1

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=3 opt=b OPTARG=hi
OPTIND=5 opt=c OPTARG=hello
stderr:
ash19 More Smooshing 1

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=3 opt=b OPTARG=hi
OPTIND=5 opt=c OPTARG=hello
stderr:
mksh19 More Smooshing 1

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=3 opt=b OPTARG=hi
OPTIND=5 opt=c OPTARG=hello
stderr:
ksh19 More Smooshing 1

[ksh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n' Got 'OPTIND=2 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n'

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=3 opt=b OPTARG=hi
OPTIND=5 opt=c OPTARG=hello
stderr:
toysh19 More Smooshing 1

[toysh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n'

stdout:
OPTIND= opt= OPTARG=
OPTIND= opt= OPTARG=
OPTIND= opt= OPTARG=
stderr:
sh: getopts: No such file or directory
sh: getopts: No such file or directory
sh: getopts: No such file or directory
dash20 More Smooshing 2

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
OPTIND=2 opt=c OPTARG=10
stderr:
ash20 More Smooshing 2

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
OPTIND=2 opt=c OPTARG=10
stderr:
mksh20 More Smooshing 2

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
OPTIND=2 opt=c OPTARG=10
stderr:
ksh20 More Smooshing 2

[ksh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND=2 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n'

stdout:
OPTIND=2 opt=a OPTARG=
OPTIND=2 opt=b OPTARG=
OPTIND=2 opt=c OPTARG=10
stderr:
toysh20 More Smooshing 2

[toysh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n'

stdout:
OPTIND= opt= OPTARG=
OPTIND= opt= OPTARG=
OPTIND= opt= OPTARG=
stderr:
sh: getopts: No such file or directory
sh: getopts: No such file or directory
sh: getopts: No such file or directory
sush20 More Smooshing 2

[sush stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=1 opt=? OPTARG=\n'

stdout:
OPTIND=1 opt=a OPTARG=
OPTIND=1 opt=b OPTARG=
OPTIND=1 opt=? OPTARG=
stderr:
brush20 More Smooshing 2

[brush stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=1 opt=? OPTARG=\n'

stdout:
OPTIND=1 opt=a OPTARG=
OPTIND=1 opt=b OPTARG=
OPTIND=1 opt=? OPTARG=
stderr:
getopts: illegal option -- c
dash21 OPTIND should be >= 1 (regression)

stdout:
stderr: 
dash: 1: Illegal number: -1
toysh21 OPTIND should be >= 1 (regression)

[toysh stdout] Expected 'status=1\nstatus=1\n', got 'status=127\nstatus=127\n'

stdout:
status=127
status=127
stderr:
sh: getopts: No such file or directory
sh: getopts: No such file or directory
brush21 OPTIND should be >= 1 (regression)

[brush stdout] Expected 'status=1\nstatus=1\n', got 'status=1\nstatus=2\n'

stdout:
status=1
status=2
stderr:
ERROR failed to parse integer
toysh22 getopts bug #1523

[toysh stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nopt:a\nopt:b\nopt:c arg:de\n' Got 'arg:-abcdef\narg:-abcde\n'
[toysh status] Expected 1, got 0

stdout:
arg:-abcdef
arg:-abcde
stderr:
sh: getopts: No such file or directory
sush22 getopts bug #1523

[sush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nopt:a\nopt:b\nopt:c arg:de\n' Got 'opt:a\nopt:b\nopt:c arg:-abcde\n'

stdout:
opt:a
opt:b
opt:c arg:-abcde
stderr:
brush22 getopts bug #1523

[brush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nopt:a\nopt:b\nopt:c arg:de\n' Got 'arg:-abcdef\narg:-abcde\n'
[brush status] Expected 1, got 0

stdout:
arg:-abcdef
arg:-abcde
stderr:
toysh23 More regression for #1523

[toysh stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nerr:?\nerr:?\nerr:?\n' Got 'arg:-abcdef\narg:-xyz\n'
[toysh status] Expected 1, got 0

stdout:
arg:-abcdef
arg:-xyz
stderr:
sh: getopts: No such file or directory
sush23 More regression for #1523

[sush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nerr:?\nerr:?\nerr:?\n' Got 'opt:a\nopt:b\nopt:c arg:-xyz\n'

stdout:
opt:a
opt:b
opt:c arg:-xyz
stderr:
brush23 More regression for #1523

[brush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nerr:?\nerr:?\nerr:?\n' Got 'arg:-abcdef\narg:-xyz\n'
[brush status] Expected 1, got 0

stdout:
arg:-abcdef
arg:-xyz
stderr: