97 passed, 5 OK, 0 not implemented, 4 BUG, 62 failed, 0 timeouts, 0 cases skipped 3 failed under osh
toysh | 0 getopts empty [toysh stdout] Expected 'status=1 opt=? OPTARG=\n', got 'status=127 opt= OPTARG=\n' stdout: status=127 opt= OPTARG=stderr: set: bad -- sh: getopts: No such file or directory |
toysh | 1 getopts sees unknown arg [toysh stdout] Expected 'status=0 opt=? OPTARG=\n', got 'status=127 opt= OPTARG=\n' stdout: status=127 opt= OPTARG=stderr: set: bad -- sh: getopts: No such file or directory |
sush | 1 getopts sees unknown arg [sush stdout] Expected 'status=0 opt=? OPTARG=\n', got 'status=1 opt=? OPTARG=\n' stdout: status=1 opt=? OPTARG=stderr: |
brush | 1 getopts sees unknown arg [brush stdout] Expected 'status=0 opt=? OPTARG=\n', got 'status=1 opt=? OPTARG=\n' stdout: status=1 opt=? OPTARG=stderr: |
toysh | 2 getopts three invocations [toysh stdout] Expected 'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=?\n' Got 'status=127 opt=\nstatus=127 opt=\nstatus=127 opt=\n' stdout: status=127 opt= status=127 opt= status=127 opt=stderr: set: bad -- sh: getopts: No such file or directory sh: getopts: No such file or directory sh: getopts: No such file or directory |
brush | 2 getopts three invocations [brush stdout] Expected 'status=0 opt=h\nstatus=0 opt=c\nstatus=1 opt=?\n' Got 'status=1 opt=?\nstatus=1 opt=?\nstatus=1 opt=?\n' stdout: status=1 opt=? status=1 opt=? status=1 opt=?stderr: |
toysh | 3 getopts resets OPTARG [toysh stdout] Expected 'status=0 opt=c OPTARG=foo\nstatus=0 opt=h OPTARG=\n' Got 'status=127 opt= OPTARG=\nstatus=127 opt= OPTARG=\n' stdout: status=127 opt= OPTARG= status=127 opt= OPTARG=stderr: set: bad -- sh: getopts: No such file or directory sh: getopts: No such file or directory |
brush | 3 getopts resets OPTARG [brush stdout] Expected 'status=0 opt=c OPTARG=foo\nstatus=0 opt=h OPTARG=\n' Got 'status=1 opt=? OPTARG=\nstatus=1 opt=? OPTARG=\n' stdout: status=1 opt=? OPTARG= status=1 opt=? OPTARG=stderr: |
toysh | 4 Basic getopts invocation [toysh stdout] Expected 'h=1 c=foo optind=4 argv=x y z\n', got 'h=0 c= optind= argv=\n' stdout: h=0 c= optind= argv=stderr: set: bad -- sh: getopts: No such file or directory |
brush | 4 Basic getopts invocation [brush stdout] Expected 'h=1 c=foo optind=4 argv=x y z\n', got 'h=0 c= optind=1 argv=-h -c foo x y z\n' stdout: h=0 c= optind=1 argv=-h -c foo x y zstderr: |
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 |
ksh | 5 getopts with invalid variable name [ksh stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=1 opt= OPTARG= OPTIND=1\n' stdout: status=1 opt= OPTARG= OPTIND=1stderr: E: ksh: <stdin>[2]: getopts: opt-: not an identifier |
toysh | 5 getopts with invalid variable name [toysh stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=127 opt= OPTARG= OPTIND=\n' stdout: status=127 opt= OPTARG= OPTIND=stderr: set: bad -- sh: getopts: No such file or directory |
sush | 5 getopts with invalid variable name [sush stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=1 opt= OPTARG=foo OPTIND=3\n' stdout: status=1 opt= OPTARG=foo OPTIND=3stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: getopts: VariableInvalid("opt-") |
brush | 5 getopts with invalid variable name [brush stdout] Expected 'status=2 opt= OPTARG=foo OPTIND=3\n', got 'status=1 opt= OPTARG= OPTIND=1\n' stdout: status=1 opt= OPTARG= OPTIND=1stderr: |
toysh | 6 getopts with invalid flag [toysh stdout] Expected 'ERROR 3\n', got 'status=0\n' [toysh status] Expected 2, got 0 stdout: status=0stderr: set: bad -- sh: getopts: No such file or directory |
sush | 6 getopts with invalid flag [sush stdout] Expected 'ERROR 3\n', got 'status=0\n' [sush status] Expected 2, got 0 stdout: status=0stderr: |
brush | 6 getopts with invalid flag [brush stdout] Expected 'ERROR 3\n', got 'status=0\n' [brush status] Expected 2, got 0 stdout: status=0stderr: |
toysh | 7 getopts with with - [toysh stdout] Expected '-h -\nstatus=0\n', got '\nstatus=0\n' stdout: status=0stderr: set: bad -- sh: getopts: No such file or directory |
toysh | 8 getopts missing required argument [toysh stdout] Expected 'ERROR 3\n', got 'status=0\n' [toysh status] Expected 2, got 0 stdout: status=0stderr: set: bad -- sh: getopts: No such file or directory |
sush | 8 getopts missing required argument [sush stdout] Expected 'ERROR 3\n', got 'status=0\n' [sush status] Expected 2, got 0 stdout: status=0stderr: |
brush | 8 getopts missing required argument [brush stdout] Expected 'ERROR 3\n', got 'status=0\n' [brush status] Expected 2, got 0 stdout: status=0stderr: |
toysh | 9 getopts doesn't look for flags after args [toysh stdout] Expected 'h=0 c= optind=1 argv=x -h -c y\n', got 'h=0 c= optind= argv=\n' stdout: h=0 c= optind= argv=stderr: set: bad -- sh: getopts: No such file or directory |
toysh | 10 getopts with explicit args [toysh stdout] Expected 'h=1 c=foo optind=4 argv=A B C\n', got 'h=0 c= optind= argv=\n' stdout: h=0 c= optind= argv=stderr: set: bad -- sh: getopts: No such file or directory |
brush | 10 getopts with explicit args [brush stdout] Expected 'h=1 c=foo optind=4 argv=A B C\n', got 'h=0 c= optind=1 argv=A B C\n' stdout: h=0 c= optind=1 argv=A B Cstderr: Parse command options Usage: getopts <OPTIONS_STRING> <VARIABLE_NAME> [ARGS]... Arguments: <OPTIONS_STRING> Specification for options <VARIABLE_NAME> Name of variable to receive next option [ARGS]... Arguments to parse Options: -h, --help Print help |
toysh | 11 OPTIND [toysh stdout] Expected '1\n', got '\n' stdout: stderr: |
mksh | 12 OPTIND after multiple getopts with same spec stdout: OPTIND=1 - - OPTIND=4 OPTIND=4stderr: mksh: <stdin>[15]: getopts: arguments changed since last call |
ksh | 12 OPTIND after multiple getopts with same spec [ksh 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=4stderr: E: ksh: <stdin>[15]: getopts: arguments changed since last call |
toysh | 12 OPTIND after multiple getopts with same spec [toysh stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=\nOPTIND=\nOPTIND=\n' stdout: OPTIND= OPTIND= OPTIND=stderr: sh: getopts: No such file or directory set: bad -- sh: getopts: No such file or directory set: bad -- sh: getopts: No such file or directory |
sush | 12 OPTIND after multiple getopts with same spec [sush 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=4stderr: |
brush | 12 OPTIND after multiple getopts with same spec [brush stdout] Expected 'OPTIND=1\n-\n-\nOPTIND=4\nOPTIND=1\n', got 'OPTIND=1\nOPTIND=1\nOPTIND=1\n' stdout: OPTIND=1 OPTIND=1 OPTIND=1stderr: |
osh | 12 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=4stderr: |
mksh | 13 OPTIND after multiple getopts with different spec stdout: . OPTIND=2 - - OPTIND=5 OPTIND=5stderr: mksh: <stdin>[16]: getopts: arguments changed since last call |
ksh | 13 OPTIND after multiple getopts with different spec [ksh 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=5stderr: E: ksh: <stdin>[16]: getopts: arguments changed since last call |
toysh | 13 OPTIND after multiple getopts with different spec [toysh stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got 'OPTIND=\nOPTIND=\nOPTIND=\n' stdout: OPTIND= OPTIND= OPTIND=stderr: set: bad -- sh: getopts: No such file or directory set: bad -- sh: getopts: No such file or directory set: bad -- sh: getopts: No such file or directory |
sush | 13 OPTIND after multiple getopts with different spec [sush 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=5stderr: |
brush | 13 OPTIND after multiple getopts with different spec [brush stdout] Expected '.\nOPTIND=2\n-\n-\nOPTIND=5\nOPTIND=2\n', got 'OPTIND=1\nOPTIND=1\nOPTIND=1\n' stdout: OPTIND=1 OPTIND=1 OPTIND=1stderr: |
osh | 13 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=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: |
ksh | 14 OPTIND narrowed down [ksh 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=Estderr: |
toysh | 14 OPTIND narrowed down [toysh stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a= b= c= d= e=\n' stdout: a= b= c= d= e=stderr: set: bad -- sh: getopts: No such file or directory set: bad -- sh: getopts: No such file or directory |
sush | 14 OPTIND narrowed down [sush 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=Estderr: |
brush | 14 OPTIND narrowed down [brush stdout] Expected 'a=1 b= c=1 d=1 e=E\n', got 'a= b= c= d= e=\n' stdout: a= b= c= d= e=stderr: |
osh | 14 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=Estderr: |
toysh | 15 Getopts parses the function's arguments [toysh stdout] Expected 'h=0 c=bar opt=? optind=3 argv=-h -c foo x y z\n' Got 'h=0 c= opt= optind= argv=\n' stdout: h=0 c= opt= optind= argv=stderr: set: bad -- sh: getopts: No such file or directory |
brush | 15 Getopts parses the function's arguments [brush stdout] Expected 'h=0 c=bar opt=? optind=3 argv=-h -c foo x y z\n' Got 'h=0 c= opt=? optind=1 argv=-h -c foo x y z\n' stdout: h=0 c= opt=? optind=1 argv=-h -c foo x y zstderr: |
toysh | 16 Local OPTIND [toysh stdout] Expected 'loop 2\n', got '' stdout: stderr: sh: getopts: No such file or directory |
mksh | 17 two flags: -ab stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG=stderr: |
ksh | 17 two flags: -ab [ksh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\n' Got 'OPTIND=2 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\n' stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG=stderr: |
toysh | 17 two flags: -ab [toysh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n' stdout: OPTIND= opt= OPTARG= OPTIND= opt= OPTARG=stderr: sh: getopts: No such file or directory sh: getopts: No such file or directory |
toysh | 18 flag and arg: -c10 [toysh stdout] Expected 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=? OPTARG=\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n' stdout: OPTIND= opt= OPTARG= OPTIND= opt= OPTARG=stderr: sh: getopts: No such file or directory sh: getopts: No such file or directory |
sush | 18 flag and arg: -c10 [sush stdout] Expected 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=? OPTARG=\n' Got 'OPTIND=1 opt=? OPTARG=\nOPTIND=1 opt=? OPTARG=\n' stdout: OPTIND=1 opt=? OPTARG= OPTIND=1 opt=? OPTARG=stderr: |
brush | 18 flag and arg: -c10 [brush stdout] Expected 'OPTIND=2 opt=c OPTARG=10\nOPTIND=2 opt=? OPTARG=\n' Got 'OPTIND=1 opt=? OPTARG=\nOPTIND=1 opt=? OPTARG=\n' stdout: OPTIND=1 opt=? OPTARG= OPTIND=1 opt=? OPTARG=stderr: getopts: illegal option -- c getopts: illegal option -- 1 |
mksh | 19 More Smooshing 1 stdout: OPTIND=2 opt=a OPTARG= OPTIND=3 opt=b OPTARG=hi OPTIND=5 opt=c OPTARG=hellostderr: |
ksh | 19 More Smooshing 1 [ksh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n' Got 'OPTIND=2 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n' stdout: OPTIND=2 opt=a OPTARG= OPTIND=3 opt=b OPTARG=hi OPTIND=5 opt=c OPTARG=hellostderr: |
toysh | 19 More Smooshing 1 [toysh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=3 opt=b OPTARG=hi\nOPTIND=5 opt=c OPTARG=hello\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n' stdout: OPTIND= opt= OPTARG= OPTIND= opt= OPTARG= OPTIND= opt= OPTARG=stderr: sh: getopts: No such file or directory sh: getopts: No such file or directory sh: getopts: No such file or directory |
mksh | 20 More Smooshing 2 stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG= OPTIND=2 opt=c OPTARG=10stderr: |
ksh | 20 More Smooshing 2 [ksh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND=2 opt=a OPTARG=\nOPTIND=2 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' stdout: OPTIND=2 opt=a OPTARG= OPTIND=2 opt=b OPTARG= OPTIND=2 opt=c OPTARG=10stderr: |
toysh | 20 More Smooshing 2 [toysh stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\nOPTIND= opt= OPTARG=\n' stdout: OPTIND= opt= OPTARG= OPTIND= opt= OPTARG= OPTIND= opt= OPTARG=stderr: sh: getopts: No such file or directory sh: getopts: No such file or directory sh: getopts: No such file or directory |
sush | 20 More Smooshing 2 [sush stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=1 opt=? OPTARG=\n' stdout: OPTIND=1 opt=a OPTARG= OPTIND=1 opt=b OPTARG= OPTIND=1 opt=? OPTARG=stderr: |
brush | 20 More Smooshing 2 [brush stdout] Expected 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=2 opt=c OPTARG=10\n' Got 'OPTIND=1 opt=a OPTARG=\nOPTIND=1 opt=b OPTARG=\nOPTIND=1 opt=? OPTARG=\n' stdout: OPTIND=1 opt=a OPTARG= OPTIND=1 opt=b OPTARG= OPTIND=1 opt=? OPTARG=stderr: getopts: illegal option -- c |
toysh | 21 OPTIND should be >= 1 (regression) [toysh stdout] Expected 'status=1\nstatus=1\n', got 'status=127\nstatus=127\n' stdout: status=127 status=127stderr: sh: getopts: No such file or directory sh: getopts: No such file or directory |
brush | 21 OPTIND should be >= 1 (regression) [brush stdout] Expected 'status=1\nstatus=1\n', got 'status=1\nstatus=2\n' stdout: status=1 status=2stderr: [31mERROR[0m failed to parse integer |
toysh | 22 getopts bug #1523 [toysh stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nopt:a\nopt:b\nopt:c arg:de\n' Got 'arg:-abcdef\narg:-abcde\n' [toysh status] Expected 1, got 0 stdout: arg:-abcdef arg:-abcdestderr: sh: getopts: No such file or directory |
sush | 22 getopts bug #1523 [sush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nopt:a\nopt:b\nopt:c arg:de\n' Got 'opt:a\nopt:b\nopt:c arg:-abcde\n' stdout: opt:a opt:b opt:c arg:-abcdestderr: |
brush | 22 getopts bug #1523 [brush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nopt:a\nopt:b\nopt:c arg:de\n' Got 'arg:-abcdef\narg:-abcde\n' [brush status] Expected 1, got 0 stdout: arg:-abcdef arg:-abcdestderr: |
toysh | 23 More regression for #1523 [toysh stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nerr:?\nerr:?\nerr:?\n' Got 'arg:-abcdef\narg:-xyz\n' [toysh status] Expected 1, got 0 stdout: arg:-abcdef arg:-xyzstderr: sh: getopts: No such file or directory |
sush | 23 More regression for #1523 [sush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nerr:?\nerr:?\nerr:?\n' Got 'opt:a\nopt:b\nopt:c arg:-xyz\n' stdout: opt:a opt:b opt:c arg:-xyzstderr: |
brush | 23 More regression for #1523 [brush stdout] Expected 'opt:a\nopt:b\nopt:c arg:def\nerr:?\nerr:?\nerr:?\n' Got 'arg:-abcdef\narg:-xyz\n' [brush status] Expected 1, got 0 stdout: arg:-abcdef arg:-xyzstderr: |