spec test index / oilshell.org
25 passed, 0 OK, 0 not implemented, 6 BUG, 20 failed, 0 timeouts, 0 cases skipped 1 failed under osh
osh_.cc | 0 getopts empty [osh_.cc stdout] Expected 'status=1 opt=? OPTARG=\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 2 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 1 getopts sees unknown arg [osh_.cc stdout] Expected 'status=0 opt=? OPTARG=\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 2 getopts three invocations [osh_.cc stdout] Expected u'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=?\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 5 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 3 getopts resets OPTARG [osh_.cc stdout] Expected u'status=0 opt=c OPTARG=foo\nstatus=0 opt=h OPTARG=\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 5 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 4 Basic getopts invocation [osh_.cc stdout] Expected 'h=1 c=foo optind=4 argv=x y z\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 8 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 5 getopts with invalid variable name [osh_.cc stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 5 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.py | 6 getopts with invalid flag [osh_.py status] Expected 2, got 1 stdout: ERROR 3stderr: |
osh_.cc | 6 getopts with invalid flag [osh_.cc stdout] Expected 'ERROR 3\n', got '' [osh_.cc status] Expected 2, got -6 stdout: stderr: set 4 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.py | 7 getopts missing required argument [osh_.py status] Expected 2, got 1 stdout: ERROR 3stderr: [??? no location ???] getopts: option '-c' requires an argument. (getopts argv: -h -c) |
osh_.cc | 7 getopts missing required argument [osh_.cc stdout] Expected 'ERROR 3\n', got '' [osh_.cc status] Expected 2, got -6 stdout: stderr: set 4 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 8 getopts doesn't look for flags after args [osh_.cc stdout] Expected 'h=0 c= optind=1 argv=x -h -c y\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 6 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 9 getopts with explicit args [osh_.cc stdout] Expected 'h=1 c=foo optind=4 argv=A B C\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 5 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh | 11 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: |
osh_.py | 11 OPTIND after multiple getopts with same spec stdout: 1 - - 4 4stderr: |
osh_.cc | 11 OPTIND after multiple getopts with same spec [osh_.cc stdout] Expected u'1\n-\n-\n4\n4\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh | 12 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: |
osh_.py | 12 OPTIND after multiple getopts with different spec stdout: . 2 - - 5 5stderr: |
osh_.cc | 12 OPTIND after multiple getopts with different spec [osh_.cc stdout] Expected u'.\n2\n-\n-\n5\n5\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh | 13 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
osh_.py | 13 OPTIND narrowed down stdout: a=1 b= c= d=1 e=Estderr: |
osh_.cc | 13 OPTIND narrowed down [osh_.cc stdout] Expected 'a=1 b= c= d=1 e=E\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 14 Getopts parses the function's arguments [osh_.cc stdout] Expected 'h=0 c=bar opt=? optind=3 argv=-h -c foo x y z\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: set 8 osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh_.cc | 15 Local OPTIND [osh_.cc stdout] Expected 'loop 2\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |
osh | 16 Flags can be smooshed together, e.g. -ab [osh stdout] Expected 'OPTIND=2 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n', got 'OPTIND=2 opt=? OPTARG=\nOPTIND=2 opt=? OPTARG=\nOPTIND=2 opt=? OPTARG=\n' stdout: OPTIND=2 opt=? OPTARG= OPTIND=2 opt=? OPTARG= OPTIND=2 opt=? OPTARG=stderr: |
osh_.py | 16 Flags can be smooshed together, e.g. -ab [osh_.py stdout] Expected 'OPTIND=2 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n', got 'OPTIND=2 opt=? OPTARG=\nOPTIND=2 opt=? OPTARG=\nOPTIND=2 opt=? OPTARG=\n' stdout: OPTIND=2 opt=? OPTARG= OPTIND=2 opt=? OPTARG= OPTIND=2 opt=? OPTARG=stderr: |
osh_.cc | 16 Flags can be smooshed together, e.g. -ab [osh_.cc stdout] Expected 'OPTIND=2 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, Dict<Str *, bool> *>::index(K) [K = Str *, V = Dict<Str *, bool> *]: Assertion `0' failed. |