Results for oil-expr.test.sh

statusoshosh_ALT
pass 5151
FAIL 77
total5858
caseoshosh_ALTdescription
0pass pass command sub $(echo hi)
1pass pass shell array %(a 'b c')
2pass pass empty array and simple_word_eval (regression test)
3pass pass Empty array and assignment builtin (regression)
4pass pass Shell arrays support tilde detection, static globbing, brace detection
5pass pass augmented assignment doesn't work on shell arrays
6pass pass Splice in array
7pass pass Splice in assoc array
8pass pass Can't splice string
9pass pass Can't splice undefined
10pass pass Set $HOME using 'var' (i.e. Oil string var in word evaluator)
11pass pass Use shell var in Oil expression
12pass pass Length in two different contexts
13pass pass $len(x) inside strings
14pass pass Func with multiple args in multiple contexts
15pass pass Trailing Comma in Param list
16pass pass @range()
17FAIL FAIL Wrong sigil $range() shows representation of iterator?
detailsdetails
18FAIL FAIL Wrong sigil @max(3, 4)
detailsdetails
19FAIL FAIL nested expr contexts
detailsdetails
20pass pass Test value.Obj inside shell arithmetic
21pass pass Parse { setvar x = 1 }
22pass pass double quoted
23pass pass double quoted respects strict_array
24pass pass single quoted -- implicit and explicit raw
25pass pass Implicit raw single quote with backslash is a syntax error
26pass pass single quoted C strings: c'foo\n' and $'foo\n'
27pass pass simple var sub $name $0 $1 $? etc.
28pass pass braced var sub ${x:-default}
29pass pass braced var sub respects strict_array
30pass pass null / true / false
31pass pass Integer literals
32pass pass Float Literals
33FAIL FAIL Float Literals with _ (requires re2c refinement)
detailsdetails
34pass pass Tuples
35pass pass List comprehension (deferred)
36pass pass in, not in
37pass pass Chained Comparisons
38pass pass dict with 'bare word' keys
39pass pass dict with expression keys
40pass pass dict literal with implicit value
41pass pass Dict literal with string keys
42pass pass Bitwise logical
43pass pass Shift operators
44pass pass Exponentiation with **
45pass pass Two Kinds of Division
46pass pass mod operator
47pass pass Logical operators
48pass pass x if b else y
49pass pass multiline strings, list, tuples, etc.
50pass pass multiline dict
51pass pass multiline array and command sub (only here docs disallowed)
52pass pass obj.attr and obj.method()
53FAIL FAIL obj.method does NOT give you a bound method
detailsdetails
54pass pass d->key
55pass pass a ++ b for string/list concatenation
56FAIL FAIL s ~~ glob and s !~~ glob
detailsdetails
57FAIL FAIL 3 ~== '3'
detailsdetails
102 passed, 0 OK, 0 not implemented, 0 BUG, 7 failed, 0 timeouts, 0 cases skipped
7 failed under osh

Details on runs that didn't PASS

osh17 Wrong sigil $range() shows representation of iterator?

[osh stdout] Expected 'TODO\n', got 'xrange(10, 16, 2)\n'

stdout:
xrange(10, 16, 2)
stderr:
osh_ALT17 Wrong sigil $range() shows representation of iterator?

[osh_ALT stdout] Expected 'TODO\n', got 'xrange(10, 16, 2)\n'

stdout:
xrange(10, 16, 2)
stderr:
osh18 Wrong sigil @max(3, 4)

[osh stdout] Expected 'TODO\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 312, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 260, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 220, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 633, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1476, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1323, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 599, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1910, in EvalWordSequence2
    return self.SimpleEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1870, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1524, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1493, in _EvalWordPart
    a = [str(item) for item in func(*pos_args, **named_args)]
TypeError: 'int' object is not iterable
osh_ALT18 Wrong sigil @max(3, 4)

[osh_ALT stdout] Expected 'TODO\n', got ''
[osh_ALT status] Expected 0, got 1
[osh_ALT stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 287, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 260, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 220, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 633, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 174, in Batch
    return status
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1476, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1323, in _Execute
    status, check_errexit = self._Dispatch(node, pipeline_st)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 636, in _Dispatch
    status = self._Execute(node.child)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1910, in EvalWordSequence2
    return self.SimpleEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1870, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1524, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1506, in _EvalWordPart
    part_vals.append(part_val)
TypeError: 'int' object is not iterable
FATAL: couldn't import from app bundle '/home/andy/git/oilshell/oil/_tmp/oil-tar-test/oil-0.8.7/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh19 nested expr contexts

[osh stdout] Expected 'len\n3\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 312, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 260, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 220, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 633, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 153, in Batch
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2227, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2089, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2019, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1965, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1890, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1632, in ParseCompoundCommand
    n8 = self.w_parser.ParseVarDecl(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 921, in ParseVarDecl
    enode, last_token = self.parse_ctx.ParseVarDecl(kw_token, self.lexer)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 332, in ParseVarDecl
    pnode, last_token = self.e_parser.Parse(lexer, grammar_nt.oil_var_decl)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_parse.py", line 311, in Parse
    lexer)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_parse.py", line 214, in _PushOilTokens
    node = c_parser.ParseCommandSub()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2265, in ParseCommandSub
    c_list = self._ParseCommandTerm()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2152, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2019, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1965, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1939, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 958, in ParseSimpleCommand
    redirects, words, block = self._ScanSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 675, in _ScanSimpleCommand
    self._Peek()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 522, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1637, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1597, in _ReadWord
    w = self._ReadCompoundWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1333, in _ReadCompoundWord
    return self._ReadCompoundWord3(lex_mode, Id.Undefined_Tok, True)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1392, in _ReadCompoundWord3
    self._ParseCallArguments(arglist)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1254, in _ParseCallArguments
    self.parse_ctx.ParseOilArgList(self.lexer, arglist)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 361, in ParseOilArgList
    raise AssertionError()
AssertionError
osh_ALT19 nested expr contexts

[osh_ALT stdout] Expected 'len\n3\n', got ''
[osh_ALT status] Expected 0, got 1
[osh_ALT stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 287, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 260, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 220, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 633, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 153, in Batch
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2227, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2089, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2019, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1965, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1890, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1632, in ParseCompoundCommand
    n8 = self.w_parser.ParseVarDecl(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 921, in ParseVarDecl
    enode, last_token = self.parse_ctx.ParseVarDecl(kw_token, self.lexer)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 332, in ParseVarDecl
    pnode, last_token = self.e_parser.Parse(lexer, grammar_nt.oil_var_decl)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_parse.py", line 311, in Parse
    lexer)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_parse.py", line 291, in _PushOilTokens
    raise parse.ParseError("incomplete input", tok.id, tok)
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2265, in ParseCommandSub
    c_list = self._ParseCommandTerm()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2195, in _ParseCommandTerm
    return command.CommandList(children)
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2019, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1965, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1939, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 958, in ParseSimpleCommand
    redirects, words, block = self._ScanSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 675, in _ScanSimpleCommand
    self._Peek()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 522, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1637, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1597, in _ReadWord
    w = self._ReadCompoundWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1333, in _ReadCompoundWord
    return self._ReadCompoundWord3(lex_mode, Id.Undefined_Tok, True)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1494, in _ReadCompoundWord3
    word=w)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1254, in _ParseCallArguments
    self.parse_ctx.ParseOilArgList(self.lexer, arglist)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 361, in ParseOilArgList
    raise AssertionError()
AssertionError
FATAL: couldn't import from app bundle '/home/andy/git/oilshell/oil/_tmp/oil-tar-test/oil-0.8.7/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh33 Float Literals with _ (requires re2c refinement)

[osh stdout] Expected 'less\ngreat\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  var x = 1.2 + 2_3.0e-1  # 3.5
                    ^~~~
[ stdin ]:2: Syntax error in expression (near Id.Expr_Float)
osh_ALT33 Float Literals with _ (requires re2c refinement)

[osh_ALT stdout] Expected 'less\ngreat\n', got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
  var x = 1.2 + 2_3.0e-1  # 3.5
                    ^~~~
[ stdin ]:2: Syntax error in expression (near Id.Expr_Float)
osh53 obj.method does NOT give you a bound method

[osh stdout] Expected '', got '<built-in method upper of str object at 0x7f7fd028a170>\n'

stdout:
<built-in method upper of str object at 0x7f7fd028a170>
stderr:
osh_ALT53 obj.method does NOT give you a bound method

[osh_ALT stdout] Expected '', got '<built-in method upper of str object at 0x7f6e1f337e40>\n'

stdout:
<built-in method upper of str object at 0x7f6e1f337e40>
stderr:
osh56 s ~~ glob and s !~~ glob

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

stdout:
stderr: 
  shopt -s oil:all
  ^~~~~
[ stdin ]:1: fatal: ~~ not implemented
osh_ALT56 s ~~ glob and s !~~ glob

[osh_ALT stdout] Expected 'yes\nno\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
  shopt -s oil:all
  ^~~~~
[ stdin ]:1: fatal: ~~ not implemented
osh57 3 ~== '3'

[osh stdout] Expected 'exact\nint-str\nint-float\nstr-float\nint-str-float\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  shopt -s oil:all
  ^~~~~
[ stdin ]:1: fatal: ~== not implemented
osh_ALT57 3 ~== '3'

[osh_ALT stdout] Expected 'exact\nint-str\nint-float\nstr-float\nint-str-float\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
  shopt -s oil:all
  ^~~~~
[ stdin ]:1: fatal: ~== not implemented