Results for builtin-getopts.test.sh

statusoshosh-cpp
pass 2828
FAIL 33
total3131
caseoshosh-cppdescription
0pass pass getopts empty
1pass pass getopts sees unknown arg
2pass pass getopts three invocations
3pass pass getopts resets OPTARG
4pass pass OPTARG is empty (not unset) after parsing a flag doesn't take an arg
5pass pass Basic getopts invocation
6pass pass getopts with invalid variable name
7pass pass getopts with invalid flag
8pass pass getopts with with -
9pass pass getopts missing required argument
10pass pass getopts doesn't look for flags after args
11pass pass getopts with explicit args
12pass pass OPTIND
13FAIL FAIL OPTIND after multiple getopts with same spec
detailsdetails
14FAIL FAIL OPTIND after multiple getopts with different spec
detailsdetails
15FAIL FAIL OPTIND narrowed down
detailsdetails
16pass pass Getopts parses the function's arguments
17pass pass Local OPTIND
18pass pass two flags: -ab
19pass pass flag and arg: -c10
20pass pass More Smooshing 1
21pass pass More Smooshing 2
22pass pass OPTIND should be >= 1 (regression)
23pass pass getopts bug #1523
24pass pass More regression for #1523
25pass pass getopts silent error reporting - invalid option
26pass pass getopts silent error reporting - missing required argument
27pass pass getopts normal mode - invalid option (compare with silent)
28pass pass getopts normal mode - missing required argument (compare with silent)
29pass pass getopts handles '--' #2579
30pass pass getopts leaves all args after '--' as operands #2579
56 passed, 0 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh13 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:
osh-cpp13 OPTIND after multiple getopts with same spec

[osh-cpp 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:
osh14 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:
osh-cpp14 OPTIND after multiple getopts with different spec

[osh-cpp 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:
osh15 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:
osh-cpp15 OPTIND narrowed down

[osh-cpp 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: