Results for builtin-getopts.test.sh

casedashbashmkshashoshosh_ALTdescription
0pass pass pass pass pass pass getopts empty
1pass pass pass pass pass pass getopts sees unknown arg
2pass pass pass pass pass pass getopts three invocations
3pass pass pass pass pass pass getopts resets OPTARG
4pass pass pass pass pass pass Basic getopts invocation
5pass pass pass pass pass pass getopts with invalid flag
6pass pass pass pass pass pass getopts missing required argument
7pass pass pass pass pass pass getopts doesn't look for flags after args
8pass pass pass pass pass pass getopts with explicit args
9pass pass pass pass pass pass OPTIND
10pass pass BUG pass BUG BUG OPTIND after multiple getopts with same spec
detailsdetailsdetails
11BUG pass BUG BUG BUG BUG OPTIND after multiple getopts with different spec
detailsdetailsdetailsdetailsdetails
12pass BUG BUG pass BUG BUG OPTIND narrowed down
detailsdetailsdetailsdetails
13pass pass pass pass pass pass Getopts parses the function's arguments
14pass pass pass pass pass pass Local OPTIND

78 passed, 0 ok, 0 known unimplemented, 12 known bugs, 0 failed, 0 skipped

Details on runs that didn't PASS

mksh10 OPTIND after multiple getopts with same spec

stdout:
1
-
-
4
4
stderr:
_tmp/spec-bin/mksh: <stdin>[13]: getopts: arguments changed since last call
osh10 OPTIND after multiple getopts with same spec

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

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

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

stdout:
.
2
-
-
5
5
stderr:
_tmp/spec-bin/mksh: <stdin>[14]: getopts: arguments changed since last call
ash11 OPTIND after multiple getopts with different spec

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

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

stdout:
.
2
-
-
5
5
stderr:
bash12 OPTIND narrowed down

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

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

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

stdout:
a=1 b= c= d=1 e=E
stderr: