Results for oil-expr.test.sh

statusoshosh_ALT
pass 5151
FAIL 55
total5656
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 a Python list (i.e. Oil Obj var in word evaluator)
7pass pass Can't splice undefined
8pass pass Set $HOME using 'var' (i.e. Oil string var in word evaluator)
9pass pass Use shell var in Oil expression
10pass pass Length in two different contexts
11pass pass $len(x) inside strings
12pass pass Func with multiple args in multiple contexts
13pass pass Trailing Comma in Param list
14pass pass @split(x)
15pass pass @range()
16FAIL FAIL Wrong sigil $range() shows representation of iterator?
detailsdetails
17FAIL FAIL Wrong sigil @max(3, 4)
detailsdetails
18FAIL FAIL nested expr contexts
detailsdetails
19pass pass Test value.Obj inside shell arithmetic
20pass pass Parse { setvar x = 1 }
21pass pass double quoted
22pass pass double quoted respects strict_array
23pass pass single quoted -- implicit and explicit raw
24pass pass Implicit raw single quote with backslash is a syntax error
25pass pass single quoted C strings: c'foo\n' and $'foo\n'
26pass pass simple var sub $name $0 $1 $? etc.
27pass pass braced var sub ${x:-default}
28pass pass braced var sub respects strict_array
29pass pass null / true / false
30pass pass Integer literals
31pass pass Float Literals
32FAIL FAIL Float Literals with _ (requires re2c refinement)
detailsdetails
33pass pass Tuples
34pass pass List comprehension
35pass pass in, not in
36pass pass Chained Comparisons
37pass pass dict with 'bare word' keys
38pass pass dict with expression keys
39pass pass dict literal with implicit value
40pass pass Dict literal with string keys
41pass pass Bitwise logical
42pass pass Shift operators
43pass pass Exponent is ^
44pass pass Two Kinds of Division
45pass pass mod operator
46pass pass Logical operators
47pass pass x if b else y
48pass pass multiline strings, dict, list, tuples, etc.
49pass pass multiline array and command sub (only here docs disallowed)
50pass pass s ~ regex and s !~ regex
51pass pass s ~ regex sets a local, not a global
52pass pass M can be saved and used later
53pass pass obj.attr and obj.method()
54FAIL FAIL obj.method does NOT give you a bound method
detailsdetails
55pass pass d->key
102 passed, 0 OK, 0 not implemented, 0 BUG, 5 failed, 0 timeouts, 0 cases skipped
5 failed under osh

Details on runs that didn't PASS

osh16 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_ALT16 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:
osh17 Wrong sigil @max(3, 4)

[osh stdout] Expected 'TODO\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 912, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 870, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 844, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 662, 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 163, in Batch
    is_return, is_fatal = ex.ExecuteAndCatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1784, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1729, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 981, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1491, in EvalWordSequence2
    return self.StaticEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1452, in StaticEvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1117, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1091, in _EvalWordPart
    a = [str(item) for item in func(*pos_args, **named_args)]
TypeError: 'int' object is not iterable
osh_ALT17 Wrong sigil @max(3, 4)

[osh_ALT stdout] Expected 'TODO\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 899, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 870, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 844, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 662, 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 169, in Batch
    return status
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1784, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1729, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1034, in _Dispatch
    self.mem.PopTemp()
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1491, in EvalWordSequence2
    return self.StaticEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1452, in StaticEvalWordSequence2
    self._EvalWordToParts(w, False, part_vals)  # not double quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1117, in _EvalWordToParts
    self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1102, 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.7.0/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh18 nested expr contexts

[osh stdout] Expected 'len\n3\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 912, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 870, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 844, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 662, 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 148, in Batch
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2020, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1881, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1811, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1757, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1673, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1465, in ParseCompoundCommand
    return self.w_parser.ParseVarDecl(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 845, in ParseVarDecl
    enode, last_token = self.parse_ctx.ParseVarDecl(kw_token, self.lexer)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 356, 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 299, in Parse
    lexer)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_parse.py", line 203, in _PushOilTokens
    node = c_parser.ParseCommandSub()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2058, in ParseCommandSub
    node = self._ParseCommandTerm()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1944, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1811, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1757, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1731, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 812, in ParseSimpleCommand
    redirects, words, block = self._ScanSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 550, in _ScanSimpleCommand
    self._Peek()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 419, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1454, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1414, in _ReadWord
    w = self._ReadCompoundWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1157, in _ReadCompoundWord
    return self._ReadCompoundWord3(lex_mode, Id.Undefined_Tok, True)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1255, in _ReadCompoundWord3
    self._ParseCallArguments(arglist)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1153, in _ParseCallArguments
    self.parse_ctx.ParseOilArgList(self.lexer, arglist)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 383, in ParseOilArgList
    raise AssertionError()
AssertionError
osh_ALT18 nested expr contexts

[osh_ALT stdout] Expected 'len\n3\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 899, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 870, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 844, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 662, 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 148, in Batch
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2020, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1881, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1811, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1757, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1673, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1465, in ParseCompoundCommand
    return self.w_parser.ParseVarDecl(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 845, in ParseVarDecl
    enode, last_token = self.parse_ctx.ParseVarDecl(kw_token, self.lexer)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 356, 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 299, in Parse
    lexer)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_parse.py", line 279, in _PushOilTokens
    raise parse.ParseError("incomplete input", tok.id, tok)
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2058, in ParseCommandSub
    node = self._ParseCommandTerm()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1987, in _ParseCommandTerm
    return command.CommandList(children)
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1811, in ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1757, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1731, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 812, in ParseSimpleCommand
    redirects, words, block = self._ScanSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 550, in _ScanSimpleCommand
    self._Peek()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 419, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1467, in ReadWord
    return self.cursor
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1414, in _ReadWord
    w = self._ReadCompoundWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1157, in _ReadCompoundWord
    return self._ReadCompoundWord3(lex_mode, Id.Undefined_Tok, True)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1323, in _ReadCompoundWord3
    return w
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1153, in _ParseCallArguments
    self.parse_ctx.ParseOilArgList(self.lexer, arglist)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 383, in ParseOilArgList
    raise AssertionError()
AssertionError
FATAL: couldn't import from app bundle '/home/andy/git/oilshell/oil/_tmp/oil-tar-test/oil-0.7.0/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh32 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
osh_ALT32 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
osh54 obj.method does NOT give you a bound method

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

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

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

stdout:
<built-in method upper of str object at 0x7efcef84ecb0>
stderr: