spec test index / oilshell.org
case | dash | bash | mksh | ash | osh | osh_ALT | description |
0 | pass | pass | pass | pass | pass | pass | getopts empty |
1 | pass | pass | pass | pass | pass | pass | getopts sees unknown arg |
2 | pass | pass | pass | pass | pass | pass | getopts three invocations |
3 | pass | pass | pass | pass | pass | pass | getopts resets OPTARG |
4 | pass | pass | pass | pass | pass | pass | Basic getopts invocation |
5 | pass | pass | pass | pass | pass | pass | getopts with invalid flag |
6 | pass | pass | pass | pass | pass | pass | getopts missing required argument |
7 | pass | pass | pass | pass | pass | pass | getopts doesn't look for flags after args |
8 | pass | pass | pass | pass | FAIL | FAIL | getopts with explicit args |
details | details | ||||||
9 | pass | pass | pass | pass | pass | pass | OPTIND |
10 | pass | pass | BUG | pass | BUG | BUG | OPTIND after multiple getopts with same spec |
details | details | details | |||||
11 | BUG | pass | BUG | BUG | BUG | BUG | OPTIND after multiple getopts with different spec |
details | details | details | details | details | |||
12 | pass | BUG | BUG | pass | BUG | BUG | OPTIND narrowed down |
details | details | details | details | ||||
13 | pass | pass | pass | pass | pass | pass | Getopts parses the function's arguments |
70 passed, 0 ok, 0 known unimplemented, 12 known bugs, 1 failed, 0 skipped
osh | 8 getopts with explicit args [osh stdout] Expected 'h=1 c=foo optind=4 argv=\n', got 'h=0 c= optind=1 argv=\n' stdout: h=0 c= optind=1 argv=stderr: |
osh_ALT | 8 getopts with explicit args [osh_ALT stdout] Expected 'h=1 c=foo optind=4 argv=\n', got 'h=0 c= optind=1 argv=\n' stdout: h=0 c= optind=1 argv=stderr: |
mksh | 10 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: /bin/mksh: <stdin>[13]: getopts: arguments changed since last call |
osh | 10 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: |
osh_ALT | 10 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: |
dash | 11 OPTIND after multiple getopts with different spec stdout: . 2 - - - 5 _ 2stderr: No arg for -f option |
mksh | 11 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: /bin/mksh: <stdin>[14]: getopts: arguments changed since last call |
ash | 11 OPTIND after multiple getopts with different spec stdout: . 2 - - - 5 _ 2stderr: No arg for -f option |
osh | 11 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: |
osh_ALT | 11 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: |
bash | 12 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
mksh | 12 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
osh | 12 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
osh_ALT | 12 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |