Results for var-op-other.test.sh

statusbashmkshzshoshosh_ALT
pass 14581212
ok 00133
N-I 26700
BUG 16100
FAIL 00022
total1717171717
casebashmkshzshoshosh_ALTdescription
0pass pass pass pass pass String slice
1pass pass ok ok ok Cannot take length of substring slice
detailsdetailsdetails
2pass BUG pass pass pass Out of range string slice: begin
details
3pass BUG pass pass pass Out of range string slice: length
details
4pass pass pass ok ok String slice: negative begin
detailsdetails
5pass BUG pass ok ok String slice: negative second arg is position, not length
detailsdetailsdetails
6N-I N-I N-I pass pass strict_word_eval with string slice
detailsdetailsdetails
7pass pass pass pass pass String slice with math
8pass BUG pass pass pass Slice undefined
details
9pass BUG pass pass pass Slice UTF-8 String
details
10BUG BUG BUG pass pass Slice string with invalid UTF-8 results in empty string and warning
detailsdetailsdetails
11N-I N-I N-I pass pass Slice string with invalid UTF-8 with strict_word_eval
detailsdetailsdetails
12pass N-I N-I pass pass Lower Case with , and ,,
detailsdetails
13pass N-I N-I pass pass Upper Case with ^ and ^^
detailsdetails
14pass N-I N-I FAIL FAIL Lower Case with constant string (VERY WEIRD)
detailsdetailsdetailsdetails
15pass N-I N-I FAIL FAIL Lower Case glob
detailsdetailsdetailsdetails
16pass pass N-I pass pass ${x@Q}
details
51 passed, 7 OK, 15 not implemented, 8 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

zsh1 Cannot take length of substring slice

stdout:
3
stderr:
osh1 Cannot take length of substring slice

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression, got ':'
osh_ALT1 Cannot take length of substring slice

stdout:
stderr: 
  echo ${#v:1:3}
           ^
[ stdin ]:2: Expected } after length expression, got ':'
mksh2 Out of range string slice: begin

stdout:
0
stderr:
mksh3 Out of range string slice: length

stdout:
_defg
0
stderr:
osh4 String slice: negative begin

stdout:
stderr: 
  echo ${foo: -4:3}
       ^~
[ stdin ]:2: warning: The start index of a string slice can't be negative: -4
osh_ALT4 String slice: negative begin

stdout:
stderr: 
  echo ${foo: -4:3}
       ^~
[ stdin ]:2: warning: The start index of a string slice can't be negative: -4
mksh5 String slice: negative second arg is position, not length

stdout:
defg defg defg
stderr:
osh5 String slice: negative second arg is position, not length

stdout:
stderr: 
  echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 }
       ^~
[ stdin ]:2: warning: The length of a string slice can't be negative: -1
  echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 }
                   ^~
[ stdin ]:2: warning: The length of a string slice can't be negative: -2
  echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 }
                                 ^~
[ stdin ]:2: warning: The length of a string slice can't be negative: -3
osh_ALT5 String slice: negative second arg is position, not length

stdout:
stderr: 
  echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 }
       ^~
[ stdin ]:2: warning: The length of a string slice can't be negative: -1
  echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 }
                   ^~
[ stdin ]:2: warning: The length of a string slice can't be negative: -2
  echo ${foo:3:-1} ${foo: 3: -2} ${foo:3 :-3 }
                                 ^~
[ stdin ]:2: warning: The length of a string slice can't be negative: -3
bash6 strict_word_eval with string slice

stdout:
slice
-bc-
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 1: shopt: strict_word_eval: invalid shell option name
mksh6 strict_word_eval with string slice

stdout:
slice
-bc-
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
zsh6 strict_word_eval with string slice

stdout:
slice
-bc-
stderr:
zsh: command not found: shopt
mksh8 Slice undefined

stdout:
--
--
-done-
stderr:
mksh9 Slice UTF-8 String

stdout:
stderr:
bash10 Slice string with invalid UTF-8 results in empty string and warning

stdout:
-bcd-
stderr:
mksh10 Slice string with invalid UTF-8 results in empty string and warning

stdout:
-bcd-
stderr:
zsh10 Slice string with invalid UTF-8 results in empty string and warning

stdout:
-bcd-
stderr:
bash11 Slice string with invalid UTF-8 with strict_word_eval

stdout:
slice
-bcd-
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 1: shopt: strict_word_eval: invalid shell option name
mksh11 Slice string with invalid UTF-8 with strict_word_eval

stdout:
slice
-bcd-
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
zsh11 Slice string with invalid UTF-8 with strict_word_eval

stdout:
slice
-bcd-
stderr:
zsh: command not found: shopt
mksh12 Lower Case with , and ,,

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: ${x,}: bad substitution
zsh12 Lower Case with , and ,,

stdout:
stderr: 
zsh: bad substitution
mksh13 Upper Case with ^ and ^^

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: ${x^}: bad substitution
zsh13 Upper Case with ^ and ^^

stdout:
stderr: 
zsh: bad substitution
mksh14 Lower Case with constant string (VERY WEIRD)

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: ${x,A}: bad substitution
zsh14 Lower Case with constant string (VERY WEIRD)

stdout:
stderr: 
zsh: bad substitution
osh14 Lower Case with constant string (VERY WEIRD)

[osh stdout] Expected 'aAA ABC DEF\naaa aBC DEF\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 918, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 876, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 846, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 656, 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 162, in Batch
    is_return, is_fatal = ex.ExecuteAndCatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1569, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1517, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 830, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1459, in EvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1068, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 977, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 777, in _EvalBracedVarSub
    val = self._ApplyUnarySuffixOp(val, part.suffix_op)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 515, in _ApplyUnarySuffixOp
    s = string_ops.DoUnarySuffixOp(val.s, op, arg_val.s)
  File "/home/andy/git/oilshell/oil/osh/string_ops.py", line 192, in DoUnarySuffixOp
    raise NotImplementedError("%s can't have an argument" % op.op_id)
NotImplementedError: <Id_t VOp1_Comma 180> can't have an argument
osh_ALT14 Lower Case with constant string (VERY WEIRD)

[osh_ALT stdout] Expected 'aAA ABC DEF\naaa aBC DEF\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 905, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 876, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 846, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 656, 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 168, in Batch
    return status
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1569, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1517, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 877, in _Dispatch
    self.mem.PopTemp()
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1459, in EvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1068, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 977, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 847, in _EvalBracedVarSub
    raise NotImplementedError
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 515, in _ApplyUnarySuffixOp
    s = string_ops.DoUnarySuffixOp(val.s, op, arg_val.s)
  File "/home/andy/git/oilshell/oil/osh/string_ops.py", line 269, in DoUnarySuffixOp
    return s
NotImplementedError: <Id_t VOp1_Comma 180> can't have an argument
FATAL: couldn't import from app bundle '/home/andy/git/oilshell/oil/_tmp/oil-tar-test/oil-0.7.pre5/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
mksh15 Lower Case glob

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: ${x,[d-f]}: bad substitution
zsh15 Lower Case glob

stdout:
stderr: 
zsh: bad substitution
osh15 Lower Case glob

[osh stdout] Expected 'ABC DEF\nABC deF\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 918, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 876, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 846, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 656, 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 162, in Batch
    is_return, is_fatal = ex.ExecuteAndCatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1569, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1517, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 830, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1459, in EvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1068, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 977, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 777, in _EvalBracedVarSub
    val = self._ApplyUnarySuffixOp(val, part.suffix_op)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 515, in _ApplyUnarySuffixOp
    s = string_ops.DoUnarySuffixOp(val.s, op, arg_val.s)
  File "/home/andy/git/oilshell/oil/osh/string_ops.py", line 272, in DoUnarySuffixOp
    raise NotImplementedError("Can't use %s with pattern" % op.op_id)
NotImplementedError: Can't use <Id_t VOp1_Comma 180> with pattern
osh_ALT15 Lower Case glob

[osh_ALT stdout] Expected 'ABC DEF\nABC deF\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 905, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 876, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 846, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 656, 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 168, in Batch
    return status
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1569, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1517, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 877, in _Dispatch
    self.mem.PopTemp()
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1459, in EvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1068, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 977, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 847, in _EvalBracedVarSub
    raise NotImplementedError
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 515, in _ApplyUnarySuffixOp
    s = string_ops.DoUnarySuffixOp(val.s, op, arg_val.s)
  File "/home/andy/git/oilshell/oil/osh/string_ops.py", line 272, in DoUnarySuffixOp
    raise NotImplementedError("Can't use %s with pattern" % op.op_id)
NotImplementedError: Can't use <Id_t VOp1_Comma 180> with pattern
FATAL: couldn't import from app bundle '/home/andy/git/oilshell/oil/_tmp/oil-tar-test/oil-0.7.pre5/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
zsh16 ${x@Q}

stdout:
stderr: 
zsh: bad substitution