Results for array.test.sh

casebashmkshoshdescription
0pass pass pass SETUP
1pass pass pass "${a[@]}" and "${a[*]}"
2pass pass pass ${a[@]} and ${a[*]}
3pass pass pass Empty array tests
4pass BUG pass local array
details
5pass pass pass Command with with word splitting in array
6pass ok FAIL space before ( in array initialization
detailsdetails
7pass pass pass array over multiple lines
8pass ok pass array with invalid token
details
9pass pass pass empty array
10pass pass pass array with empty string
11pass pass pass Retrieve index
12pass pass pass Retrieve out of bounds index
13pass pass pass Retrieve index that is a variable
14pass pass pass Retrieve index that is a variable without $
15pass pass pass Retrieve index that is a command sub
16pass pass FAIL Retrieve all indices with !
details
17pass N-I FAIL ${!a[1]} is named ref in bash
detailsdetails
18pass ok FAIL Retrieve indices without []
detailsdetails
19pass pass pass All elements unquoted
20pass pass pass All elements quoted
21pass pass pass $*
22pass pass pass "$*"
23pass pass pass Interpolate array into array
24pass ok ok Exporting array doesn't do anything, not even first element
detailsdetails
25pass BUG FAIL Env with array
detailsdetails
26pass pass FAIL Set element
details
27pass pass FAIL Set element with var ref
details
28pass pass FAIL Set element with array ref
details
29pass N-I FAIL Set array item to array
detailsdetails
30pass N-I FAIL Slice of array with [@]
detailsdetails
31pass N-I FAIL Negative slice
detailsdetails
32pass N-I FAIL Slice with arithmetic
detailsdetails
33pass pass pass Number of elements
34pass pass pass Length of an element
35pass pass pass Iteration
36pass pass pass glob within array yields separate elements
37pass pass FAIL declare array and then append
details
38pass ok pass Array syntax in wrong place
details
39pass pass pass Empty array with :-
40ok ok ok Single array with :-
detailsdetailsdetails
41pass N-I pass Stripping a whole array unquoted
details
42pass N-I pass Stripping a whole array quoted
details
43BUG ok pass Multiple subscripts not allowed
detailsdetails
44BUG ok pass Length op, index op, then transform op is not allowed
detailsdetails
45BUG BUG pass Array subscript not allowed on string
detailsdetails
46pass pass pass Create a "user" array out of the argv array
47pass pass pass Tilde expansion within array
48pass pass pass Brace Expansion within Array
49pass pass pass array default

113 passed, 11 ok, 7 known unimplemented, 6 known bugs, 13 failed, 0 skipped

Details on runs that didn't PASS

mksh4 local array

stdout:
stderr: 
/bin/mksh: <stdin>[2]: syntax error: '(' unexpected
mksh6 space before ( in array initialization

stdout:
1
stderr:
osh6 space before ( in array initialization

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 320, in OshMain
    node = c_parser.ParseWholeFile()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1545, in ParseWholeFile
    if not self._NewlineOk(): return None
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 191, in _NewlineOk
    if not self._Peek():
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 154, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1109, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1070, in _ReadWord
    w = self._ReadCompoundWord(lex_mode=lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 904, in _ReadCompoundWord
    part2 = self._ReadArrayLiteralPart()
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 840, in _ReadArrayLiteralPart
    assert self.cur_token.id == Id.Op_LParen, self.cur_token
AssertionError: (token id:WS_Space val:" " span_id:1)
mksh8 array with invalid token

stdout:
stderr: 
/bin/mksh: <stdin>[3]: syntax error: '&' unexpected
osh16 Retrieve all indices with !

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 548, in _Dispatch
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1053, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1033, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 986, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 880, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 809, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 577, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 839, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 722, in _EvalBracedVarSub
    val = self._ApplyPrefixOp(val, part.prefix_op)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 433, in _ApplyPrefixOp
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
mksh17 ${!a[1]} is named ref in bash

stdout:
['a[1]']
stderr:
osh17 ${!a[1]} is named ref in bash

[osh stdout] Expected "['bar']\n", got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 548, in _Dispatch
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1053, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1033, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 986, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 880, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 809, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 577, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 839, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 722, in _EvalBracedVarSub
    val = self._ApplyPrefixOp(val, part.prefix_op)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 433, in _ApplyPrefixOp
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
mksh18 Retrieve indices without []

stdout:
['a']
stderr:
osh18 Retrieve indices without []

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 548, in _Dispatch
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1053, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1033, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 986, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 880, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 809, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 577, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 839, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 722, in _EvalBracedVarSub
    val = self._ApplyPrefixOp(val, part.prefix_op)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 433, in _ApplyPrefixOp
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
mksh24 Exporting array doesn't do anything, not even first element

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '(' unexpected
osh24 Exporting array doesn't do anything, not even first element

stdout:
stderr: 
Line 1 of '<stdin>'
  export PYTHONPATH=(a b c)
                     ^
Unexpected array literal: (CompoundWord
  parts: [
    (ArrayLiteralPart
      words: [
        (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:a span_id:4))])
        (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:6))])
        (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:c span_id:8))])
      ]
    )
  ]
)
---
Line 0 of '<unknown>'
  <no position info for token>
Error parsing AndOr in ParseCommandTerm
---
mksh25 Env with array

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '(' unexpected
osh25 Env with array

[osh stdout] Expected u'a\n(b b)\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
Line 1 of '<stdin>'
  A=a B=(b b) printenv.py A B
         ^
Unexpected array literal in binding: (CompoundWord
  parts: [
    (ArrayLiteralPart
      words: [
        (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:5))])
        (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:b span_id:7))])
      ]
    )
  ]
)
---
Line 0 of '<unknown>'
  <no position info for token>
Error parsing AndOr in ParseCommandTerm
---
osh26 Set element

[osh stdout] Expected "['9', '2 3']\n", got "['1', '2 3']\n"

stdout:
['1', '2 3']
stderr:
Unexpected error in execvpe('a[0]=9', ['a[0]=9'], ...): [Errno 2] No such file or directory
osh27 Set element with var ref

[osh stdout] Expected "['9', '2 3']\n", got "['1', '2 3']\n"

stdout:
['1', '2 3']
stderr:
Unexpected error in execvpe('a[0]=9', ['a[0]=9'], ...): [Errno 2] No such file or directory
osh28 Set element with array ref

[osh stdout] Expected "['1', '9']\n", got "['1', '2 3']\n"

stdout:
['1', '2 3']
stderr:
Unexpected error in execvpe('a[1]=9', ['a[1]=9'], ...): [Errno 2] No such file or directory
mksh29 Set array item to array

stdout:
stderr: 
/bin/mksh: <stdin>[2]: set: a[0]: is not an identifier
osh29 Set array item to array

[osh stdout] Expected 'status=1\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
Line 2 of '<stdin>'
  a[0]=(3 4)
        ^
Expected word type Right_FuncDef, got (CompoundWord parts:[(LiteralPart token:(token id:Lit_Chars val:3 span_id:13))])
---
Line 0 of '<unknown>'
  <no position info for token>
Error parsing AndOr in ParseCommandTerm
---
mksh30 Slice of array with [@]

stdout:
stderr: 
/bin/mksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution
osh30 Slice of array with [@]

[osh stdout] Expected "['2', '3']\n", got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 548, in _Dispatch
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1053, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1033, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 986, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 880, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 809, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 577, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 839, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 768, in _EvalBracedVarSub
    raise NotImplementedError(op)
NotImplementedError: (Slice
  begin: 
    (ArithWord
      w: (CompoundWord parts:[(LiteralPart token:(token id:Lit_Digits val:1 span_id:18))])
    )
  length: 
    (ArithWord
      w: (CompoundWord parts:[(LiteralPart token:(token id:Lit_Digits val:2 span_id:20))])
    )
)
mksh31 Negative slice

stdout:
stderr: 
/bin/mksh: <stdin>[2]: ${a[@]: (-2):1}: bad substitution
osh31 Negative slice

[osh stdout] Expected "['2']\n", got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 548, in _Dispatch
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1053, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1033, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 986, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 880, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 809, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 577, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 839, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 768, in _EvalBracedVarSub
    raise NotImplementedError(op)
NotImplementedError: (Slice
  begin: 
    (ArithUnary
      op_id: Node_UnaryMinus
      child: 
        (ArithWord
          w: (CompoundWord parts:[(LiteralPart token:(token id:Lit_Digits val:2 span_id:20))])
        )
    )
  length: 
    (ArithWord
      w: (CompoundWord parts:[(LiteralPart token:(token id:Lit_Digits val:1 span_id:23))])
    )
)
mksh32 Slice with arithmetic

stdout:
stderr: 
/bin/mksh: <stdin>[3]: ${a[@]:i-4:2}: bad substitution
osh32 Slice with arithmetic

[osh stdout] Expected "['2', '3']\n", got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 548, in _Dispatch
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1053, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 1033, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 986, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 880, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 809, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 577, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 839, in _EvalWordPart
    return self._EvalBracedVarSub(part, quoted)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 768, in _EvalBracedVarSub
    raise NotImplementedError(op)
NotImplementedError: (Slice
  begin: 
    (ArithBinary
      op_id: Arith_Minus
      left: (ArithVarRef name:i)
      right: 
        (ArithWord
          w: (CompoundWord parts:[(LiteralPart token:(token id:Lit_Digits val:4 span_id:23))])
        )
    )
  length: 
    (ArithWord
      w: (CompoundWord parts:[(LiteralPart token:(token id:Lit_Digits val:2 span_id:25))])
    )
)
osh37 declare array and then append

[osh stdout] Expected "['a', 'b', 'c']\n", got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
FATAL: Can't index string with @
mksh38 Array syntax in wrong place

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '(' unexpected
bash40 Single array with :-

stdout:
['none', 'x', '']
stderr:
mksh40 Single array with :-

stdout:
['none', 'x', 'none']
stderr:
osh40 Single array with :-

stdout:
['x', '']
stderr:
mksh41 Stripping a whole array unquoted

stdout:
stderr: 
/bin/mksh: <stdin>[2]: ${files[@]%.c}: bad substitution
mksh42 Stripping a whole array quoted

stdout:
stderr: 
/bin/mksh: <stdin>[2]: ${files[@]%.c}: bad substitution
bash43 Multiple subscripts not allowed

stdout:
['123', '123']
stderr:
mksh43 Multiple subscripts not allowed

stdout:
stderr: 
/bin/mksh: <stdin>[2]: ${a[0][0]}: bad substitution
bash44 Length op, index op, then transform op is not allowed

stdout:
3 3
stderr:
mksh44 Length op, index op, then transform op is not allowed

stdout:
stderr: 
/bin/mksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution
bash45 Array subscript not allowed on string

stdout:
abc
stderr:
mksh45 Array subscript not allowed on string

stdout:
abc
stderr: