spec test index / oilshell.org
147 passed, 17 ok, 9 known unimplemented, 4 known bugs, 3 failed, 0 skipped
mksh | 6 nounset with empty array (design bug, makes it hard to use arrays) stdout: stderr: _tmp/spec-bin/mksh: <stdin>[3]: empty[@]: parameter not set |
mksh | 7 local array stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: syntax error: '(' unexpected |
mksh | 9 space before ( in array initialization stdout: 1stderr: |
mksh | 11 array with invalid token stdout: stderr: _tmp/spec-bin/mksh: <stdin>[3]: syntax error: '&' unexpected |
mksh | 15 Negative index stdout: ['', '', '']stderr: |
mksh | 21 ${!a[1]} is named ref in bash stdout: ['a[1]']stderr: |
mksh | 22 ${!a} on array stdout: ['a']stderr: |
osh | 22 ${!a} on array [osh stdout] Expected "['']\n", got "['0', '1']\n" stdout: ['0', '1']stderr: |
mksh | 28 Exporting array doesn't do anything, not even first element stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: syntax error: '(' unexpected |
osh | 28 Exporting array doesn't do anything, not even first element stdout: stderr: export PYTHONPATH=(a b c) ^~~~~~~~~~~ [ stdin ]:1: Commands can't contain array literals |
bash | 29 Arrays can't be used as env bindings stdout: a (b b)stderr: |
mksh | 29 Arrays can't be used as env bindings stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: syntax error: '(' unexpected |
mksh | 33 Set array item to array stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: set: a[0]: is not an identifier |
osh | 33 Set array item to array [osh stdout] Expected 'status=1\n', got '' [osh status] Expected 0, got 2 stdout: stderr: a[0]=(3 4) ^ [ stdin ]:2: Expected word type <Id_t Right_FuncDef 93>, got <Id_t Word_Compound 199> |
mksh | 34 Slice of array with [@] stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution |
mksh | 35 Negative slice stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${a[@]: (-2):1}: bad substitution |
mksh | 36 Slice with arithmetic stdout: stderr: _tmp/spec-bin/mksh: <stdin>[3]: ${a[@]:i-4:2}: bad substitution |
mksh | 42 Array syntax in wrong place stdout: stderr: _tmp/spec-bin/mksh: <stdin>[1]: syntax error: '(' unexpected |
bash | 43 Single array with :- stdout: ['none', 'x', '']stderr: |
mksh | 43 Single array with :- stdout: ['none', 'x', 'none']stderr: |
osh | 43 Single array with :- stdout: ['x', '']stderr: |
mksh | 44 Stripping a whole array unquoted stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
mksh | 45 Stripping a whole array quoted stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
bash | 46 Multiple subscripts not allowed stdout: stderr: _tmp/spec-bin/bash: line 2: ${a[0][0]}: bad substitution |
mksh | 46 Multiple subscripts not allowed stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${a[0][0]}: bad substitution |
bash | 47 Length op, index op, then transform op is not allowed stdout: stderr: _tmp/spec-bin/bash: line 2: ${#a[0]/1/xxx}: bad substitution |
mksh | 47 Length op, index op, then transform op is not allowed stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution |
bash | 48 Array subscript not allowed on string stdout: abcstderr: |
mksh | 48 Array subscript not allowed on string stdout: abcstderr: |
bash | 53 Singleton Array Copy and Assign. Can't index string with int. stdout: 4 4 1 1 4 4 1 1stderr: |
mksh | 53 Singleton Array Copy and Assign. Can't index string with int. stdout: 4 4 1 1 4 4 1 1stderr: |
mksh | 58 Slice of sparse array with [@] stdout: stderr: _tmp/spec-bin/mksh: <stdin>[4]: ${a[@]: 15:2}: bad substitution |
osh | 59 Using an array itself as the index [osh stdout] Expected "['42', '99', '42', '99', '']\n", got '' [osh status] Expected 0, got 1 stdout: stderr: a[a]=42 ^ [ array LValue in (source.Stdin comment:'') ]:1: warning: Coercing undefined value to 0 in arithmetic context Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/oil.py", line 778, in <module> main(sys.argv) File "/home/andy/git/oilshell/oil/bin/oil.py", line 747, in main sys.exit(AppBundleMain(argv)) File "/home/andy/git/oilshell/oil/bin/oil.py", line 721, in AppBundleMain status = ShellMain('osh', argv0, main_argv, login_shell) File "/home/andy/git/oilshell/oil/bin/oil.py", line 542, in ShellMain status = main_loop.Batch(ex, c_parser, arena, nodes_out=nodes_out) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 160, in Batch is_control_flow, is_fatal = ex.ExecuteAndCatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1240, in ExecuteAndCatch status = self._Execute(node, fork_external=fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1188, in _Execute status, check_errexit = self._Dispatch(node, fork_external) File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 852, in _Dispatch self.mem.SetVar(lval, val, flags, lookup_mode) File "/home/andy/git/oilshell/oil/osh/state.py", line 921, in SetVar strs[lval.index] = val.s TypeError: list indices must be integers, not list |