spec test index / oilshell.org
status | dash | bash | mksh | ash | osh | osh_ALT | |
pass | 18 | 22 | 17 | 20 | 21 | 21 | |
ok | 4 | 1 | 4 | 3 | 0 | 0 | |
BUG | 2 | 1 | 3 | 1 | 3 | 3 | |
total | 24 | 24 | 24 | 24 | 24 | 24 | |
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 | ok | ok | pass | pass | pass | getopts with invalid variable name |
details | details | ||||||
6 | pass | pass | pass | pass | pass | pass | getopts with invalid flag |
7 | pass | pass | pass | pass | pass | pass | getopts with with - |
8 | pass | pass | pass | pass | pass | pass | getopts missing required argument |
9 | pass | pass | pass | pass | pass | pass | getopts doesn't look for flags after args |
10 | pass | pass | pass | pass | pass | pass | getopts with explicit args |
11 | pass | pass | pass | pass | pass | pass | OPTIND |
12 | pass | pass | BUG | pass | BUG | BUG | OPTIND after multiple getopts with same spec |
details | details | details | |||||
13 | BUG | pass | BUG | BUG | BUG | BUG | OPTIND after multiple getopts with different spec |
details | details | details | details | details | |||
14 | pass | BUG | BUG | pass | BUG | BUG | OPTIND narrowed down |
details | details | details | details | ||||
15 | pass | pass | pass | pass | pass | pass | Getopts parses the function's arguments |
16 | pass | pass | pass | pass | pass | pass | Local OPTIND |
17 | ok | pass | ok | ok | pass | pass | two flags: -ab |
details | details | details | |||||
18 | BUG | pass | pass | pass | pass | pass | flag and arg: -c10 |
details | |||||||
19 | ok | pass | ok | ok | pass | pass | More Smooshing 1 |
details | details | details | |||||
20 | ok | pass | ok | ok | pass | pass | More Smooshing 2 |
details | details | details | |||||
21 | ok | pass | pass | pass | pass | pass | OPTIND should be >= 1 (regression) |
details | |||||||
22 | pass | pass | pass | pass | pass | pass | getopts bug #1523 |
23 | pass | pass | pass | pass | pass | pass | More regression for #1523 |
119 passed, 12 OK, 0 not implemented, 13 BUG, 0 failed, 0 timeouts, 0 cases skipped
bash | 5 getopts with invalid variable name stdout: status=1 opt= OPTARG=foo OPTIND=3stderr: bash: line 2: getopts: `opt-': not a valid identifier |
mksh | 5 getopts with invalid variable name stdout: status=1 opt= OPTARG= OPTIND=1stderr: mksh: <stdin>[2]: getopts: opt-: is not an identifier |
mksh | 12 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: mksh: <stdin>[15]: getopts: arguments changed since last call |
osh | 12 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: |
osh_ALT | 12 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: |
dash | 13 OPTIND after multiple getopts with different spec stdout: . 2 - - - 5 _ 2stderr: No arg for -f option |
mksh | 13 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: mksh: <stdin>[16]: getopts: arguments changed since last call |
ash | 13 OPTIND after multiple getopts with different spec stdout: . 2 - - - 5 _ 2stderr: No arg for -f option |
osh | 13 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: |
osh_ALT | 13 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: |
bash | 14 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
mksh | 14 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
osh | 14 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
osh_ALT | 14 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
dash | 17 two flags: -ab stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG=stderr: |
mksh | 17 two flags: -ab stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG=stderr: |
ash | 17 two flags: -ab stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG=stderr: |
dash | 18 flag and arg: -c10 stdout: OPTIND=2 opt=c OPTARG=10 OPTIND=2 opt=? OPTARG=10stderr: |
dash | 19 More Smooshing 1 stdout: OPTIND=2 opt=a OPTARG= OPTIND=3 opt=b OPTARG=hi OPTIND=5 opt=c OPTARG=hellostderr: |
mksh | 19 More Smooshing 1 stdout: OPTIND=2 opt=a OPTARG= OPTIND=3 opt=b OPTARG=hi OPTIND=5 opt=c OPTARG=hellostderr: |
ash | 19 More Smooshing 1 stdout: OPTIND=2 opt=a OPTARG= OPTIND=3 opt=b OPTARG=hi OPTIND=5 opt=c OPTARG=hellostderr: |
dash | 20 More Smooshing 2 stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG= OPTIND=2 opt=c OPTARG=10stderr: |
mksh | 20 More Smooshing 2 stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG= OPTIND=2 opt=c OPTARG=10stderr: |
ash | 20 More Smooshing 2 stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG= OPTIND=2 opt=c OPTARG=10stderr: |
dash | 21 OPTIND should be >= 1 (regression) stdout: stderr: dash: 1: Illegal number: -1 |