Results for array.test.sh

casebashmkshoshdescription
0pass pass pass SETUP
1pass pass FAIL $a gives first element of array
details
2pass pass pass "${a[@]}" and "${a[*]}"
3pass pass pass ${a[@]} and ${a[*]}
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 FAIL empty array
details
8pass pass pass array with empty string
9pass pass FAIL Assign to array index without initialization
details
10pass pass pass Retrieve index
11pass pass FAIL Retrieve out of bounds index
details
12pass pass pass Retrieve index that is a variable
13pass pass pass Retrieve index that is a variable without $
14pass pass pass Retrieve index that is a command sub
15pass pass FAIL Retrieve all indices with !
details
16pass ok FAIL Retrieve indices for one value
detailsdetails
17pass ok FAIL Retrieve indices without []
detailsdetails
18pass pass pass All elements unquoted
19pass pass pass All elements quoted
20pass pass pass $*
21pass pass pass "$*"
22pass pass pass Interpolate array into array
23pass pass FAIL Arrays can't be copied directly
details
24pass BUG pass Exporting array doesn't do anything, not even first element
details
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 Slice of array with [@]
detailsdetails
30pass N-I FAIL Negative slice
detailsdetails
31pass N-I FAIL Slice with arithmetic
detailsdetails
32pass pass FAIL Number of elements
details
33pass pass pass Iteration
34pass pass pass glob within array yields separate elements
35pass pass FAIL declare array and then append
details
36pass ok pass Array syntax in wrong place
details
37pass pass FAIL Empty array with :-
details
38pass ok pass Single array with :-
details
39pass N-I FAIL Stripping a whole array
detailsdetails
40BUG ok FAIL Multiple subscripts not allowed
detailsdetailsdetails
41BUG ok pass Length op, index op, then transform op is not allowed
detailsdetails
42BUG BUG pass Array subscript not allowed on string
detailsdetails
43pass pass FAIL Create a "user" array out of the argv array
details
44pass pass pass Tilde expansion within array
45pass pass pass Brace Expansion within Array
46pass pass pass array default

101 passed, 7 ok, 4 known unimplemented, 7 known bugs, 22 failed, 0 skipped

Details on runs that didn't PASS

osh1 $a gives first element of array

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

stdout:
1 2 3
stderr:
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 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 286, in OshMain
    node = c_parser.ParseWholeFile()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1521, in ParseWholeFile
    if not self._NewlineOk(): return None
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 184, in _NewlineOk
    if not self._Peek():
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 147, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1098, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1059, in _ReadWord
    w = self._ReadCompoundWord(lex_mode=lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 893, in _ReadCompoundWord
    part2 = self._ReadArrayLiteralPart()
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 838, in _ReadArrayLiteralPart
    assert self.cur_token.id == Id.Op_LParen, self.cur_token
AssertionError: (token id:WS_Space val:" " span_id:1)
osh7 empty array

[osh stdout] Expected b'[]\n', got b"['']\n"

stdout:
['']
stderr:
osh9 Assign to array index without initialization

[osh stdout] Expected b"['9']\n", got b''

stdout:
stderr: 
Unexpected error in execvpe('b[2]=9', ['b[2]=9'], ...): [Errno 2] No such file or directory: b'/home/andy/bin/b[2]=9'
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 559, in _EvalDoubleQuotedPart
    for i, s in enumerate(part_val.strs):
AttributeError: 'UndefPartValue' object has no attribute 'strs'
osh11 Retrieve out of bounds index

[osh stdout] Expected b"['']\n", got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 559, in _EvalDoubleQuotedPart
    for i, s in enumerate(part_val.strs):
AttributeError: 'UndefPartValue' object has no attribute 'strs'
osh15 Retrieve all indices with !

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 554, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 657, in _EvalWordPart
    val = self._ApplyPrefixOp(val, part.prefix_op)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 466, in _ApplyPrefixOp
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
mksh16 Retrieve indices for one value

stdout:
['1']
stderr:
osh16 Retrieve indices for one value

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 554, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 657, in _EvalWordPart
    val = self._ApplyPrefixOp(val, part.prefix_op)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 466, in _ApplyPrefixOp
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
mksh17 Retrieve indices without []

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

[osh stdout] Expected b"['']\n", got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 554, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 657, in _EvalWordPart
    val = self._ApplyPrefixOp(val, part.prefix_op)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 466, in _ApplyPrefixOp
    raise NotImplementedError(op_id)
NotImplementedError: VSub_Bang
osh23 Arrays can't be copied directly

[osh stdout] Expected b"['x', 'y', 'z', 'x y z', 'x', 'YYY', 'z']\n", got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 793, in _Execute
    ok, val = self.ev.EvalWordToAny(pair.rhs)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 848, in EvalWordToAny
    if (len(word.parts) == 1 and 
AttributeError: 'NoneType' object has no attribute 'parts'
mksh24 Exporting array doesn't do anything, not even first element

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

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

[osh stdout] Expected b'a\n(b b)\n', got b''

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>'
  <token had no position info>
NO COL
Error parsing AndOr in ParseCommandTerm
---
osh26 Set element

[osh stdout] Expected b"['9', '2 3']\n", got b"['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: b'/home/andy/bin/a[0]=9'
osh27 Set element with var ref

[osh stdout] Expected b"['9', '2 3']\n", got b"['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: b'/home/andy/bin/a[0]=9'
osh28 Set element with array ref

[osh stdout] Expected b"['1', '9']\n", got b"['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: b'/home/andy/bin/a[1]=9'
mksh29 Slice of array with [@]

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

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 554, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 687, in _EvalWordPart
    if part.suffix_op and LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
mksh30 Negative slice

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

[osh stdout] Expected b"['2']\n", got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 554, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 687, in _EvalWordPart
    if part.suffix_op and LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
mksh31 Slice with arithmetic

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

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 554, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 687, in _EvalWordPart
    if part.suffix_op and LookupKind(part.suffix_op.op_id) == Kind.VTest:
AttributeError: 'Slice' object has no attribute 'op_id'
osh32 Number of elements

[osh stdout] Expected b'2\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 716, in _Execute
    argv = self.ev.EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 962, in EvalWordSequence
    return self._EvalWordSequence(words)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 945, in _EvalWordSequence
    args = self._EvalWordAndReframe(w)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 906, in _EvalWordAndReframe
    part_vals = self._EvalParts(word)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 799, in _EvalParts
    for v in self.part_ev._EvalWordPart(p, quoted=quoted):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 620, in _EvalWordPart
    return [self._EvalDoubleQuotedPart(part)]
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 554, in _EvalDoubleQuotedPart
    for part_val in self._EvalWordPart(p, quoted=True):
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 674, in _EvalWordPart
    raise AssertionError("Can't apply bracket op to string")
AssertionError: Can't apply bracket op to string
osh35 declare array and then append

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 327, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 937, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 828, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 793, in _Execute
    ok, val = self.ev.EvalWordToAny(pair.rhs)
  File "/home/andy/git/oil/bin/../core/word_eval.py", line 848, in EvalWordToAny
    if (len(word.parts) == 1 and 
AttributeError: 'NoneType' object has no attribute 'parts'
mksh36 Array syntax in wrong place

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

[osh stdout] Expected b"['not', 'one', 'not one']\n", got b"['not', 'one', '']\n"

stdout:
['not', 'one', '']
stderr:
mksh38 Single array with :-

stdout:
['none', 'none']
stderr:
mksh39 Stripping a whole array

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

[osh stdout] Expected b"['foo', 'sp', 'ace.h', 'bar', 'foo', 'sp ace.h', 'bar']\n", got b"['foo.c', 'sp', 'ace.h', 'bar.c', 'foo.c', 'sp ace.h', 'bar.c']\n"

stdout:
['foo.c', 'sp', 'ace.h', 'bar.c', 'foo.c', 'sp ace.h', 'bar.c']
stderr:
bash40 Multiple subscripts not allowed

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

stdout:
stderr: 
/bin/mksh: <stdin>[2]: ${a[0][0]}": bad substitution
osh40 Multiple subscripts not allowed

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 378, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 368, in main
    return OshMain(main_argv)
  File "bin/osh", line 286, in OshMain
    node = c_parser.ParseWholeFile()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1530, in ParseWholeFile
    node = self.ParseCommandTerm()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1438, in ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1303, in ParseAndOr
    left = self.ParsePipeline()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1239, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 1221, in ParseCommand
    return self.ParseSimpleCommand()  # echo foo
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 538, in ParseSimpleCommand
    result = self._ScanSimpleCommand()
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 350, in _ScanSimpleCommand
    if not self._Peek(): return None
  File "/home/andy/git/oil/bin/../osh/cmd_parse.py", line 147, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1098, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 1059, in _ReadWord
    w = self._ReadCompoundWord(lex_mode=lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 905, in _ReadCompoundWord
    part = self._ReadLeftParts()
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 513, in _ReadLeftParts
    return self._ReadDoubleQuotedPart()
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 575, in _ReadDoubleQuotedPart
    part = self._ReadDoubleQuotedLeftParts()
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 499, in _ReadDoubleQuotedLeftParts
    return self._ReadBracedBracedVarSub(d_quoted=True)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 454, in _ReadBracedBracedVarSub
    part = self._ParseVarExpr(arg_lex_mode)
  File "/home/andy/git/oil/bin/../osh/word_parse.py", line 332, in _ParseVarExpr
    raise AssertionError("Invalid op token %s" % self.cur_token)
AssertionError: Invalid op token (token id:VOp2_LBracket val:"[" span_id:28)
bash41 Length op, index op, then transform op is not allowed

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

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

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

stdout:
abc
stderr:
osh43 Create a "user" array out of the argv array

[osh stdout] Expected b"['x y', 'z', 'a b', 'c', 'a b c']\n", got b"['x y', 'z', 'a b', 'c', 'a b', 'c']\n"

stdout:
['x y', 'z', 'a b', 'c', 'a b', 'c']
stderr: