Results for builtin-getopts.test.sh

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

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

Details on runs that didn't PASS

osh-byterun0 getopts empty

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

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun1 getopts sees unknown arg

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

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun2 getopts three invocations

[osh-byterun stdout] Expected u'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=?\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun3 getopts resets OPTARG

[osh-byterun stdout] Expected u'status=0 opt=c OPTARG=foo\nstatus=0 opt=h OPTARG=\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun4 Basic getopts invocation

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

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun5 getopts with invalid flag

[osh-byterun stdout] Expected 'ERROR 3\n', got ''
[osh-byterun status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun6 getopts missing required argument

[osh-byterun stdout] Expected 'ERROR 3\n', got ''
[osh-byterun status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun7 getopts doesn't look for flags after args

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

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun8 getopts with explicit args

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

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun9 OPTIND

[osh-byterun stdout] Expected '1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
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:
osh-byterun10 OPTIND after multiple getopts with same spec

[osh-byterun stdout] Expected u'1\n-\n-\n4\n4\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
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:
osh-byterun11 OPTIND after multiple getopts with different spec

[osh-byterun stdout] Expected u'.\n2\n-\n-\n5\n5\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
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:
osh-byterun12 OPTIND narrowed down

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

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun13 Getopts parses the function's arguments

[osh-byterun stdout] Expected 'h=0 c=bar opt=? optind=3 argv=-h -c foo x y z\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun14 Local OPTIND

[osh-byterun stdout] Expected 'loop 2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend