Results for oil-expr.test.sh

statusoshosh_ALT
pass 5454
FAIL 55
total5959
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 Set $HOME using 'var' (i.e. Oil string var in word evaluator)
7pass pass Use shell var in Oil expression
8pass pass Length in two different contexts
9pass pass $len(x) inside strings
10pass pass Func with multiple args in multiple contexts
11pass pass Trailing Comma in Param list
12pass pass @range()
13FAIL FAIL Wrong sigil $range() shows representation of iterator?
detailsdetails
14FAIL FAIL Wrong sigil @max(3, 4)
detailsdetails
15FAIL FAIL nested expr contexts
detailsdetails
16pass pass Test value.Obj inside shell arithmetic
17pass pass Parse { var x = 42 }
18pass pass double quoted
19pass pass double quoted respects strict_array
20pass pass simple var sub $name $0 $1 $? etc.
21pass pass braced var sub ${x:-default}
22pass pass braced var sub respects strict_array
23pass pass null / true / false
24pass pass Integer literals
25pass pass Integer literals with underscores
26pass pass Backslash char literal (is an integer)
27pass pass \u{3bc} is char literal
28pass pass Pound char literal (is an integer)
29pass pass The literal #''' isn't accepted (use \' instead)
30pass pass Float Literals
31FAIL FAIL Float Literals with _ (requires re2c refinement)
detailsdetails
32pass pass Tuples
33pass pass List comprehension (deferred)
34pass pass in, not in
35pass pass Chained Comparisons
36pass pass dict with 'bare word' keys
37pass pass dict with expression keys
38pass pass dict literal with implicit value
39pass pass Dict literal with string keys
40pass pass Bitwise logical
41pass pass Shift operators
42pass pass Exponentiation with **
43pass pass Two Kinds of Division
44pass pass mod operator
45pass pass Logical operators
46pass pass x if b else y
47pass pass multiline strings, list, tuples, etc.
48pass pass multiline dict
49pass pass multiline array and command sub (only here docs disallowed)
50pass pass obj.attr and obj.method()
51pass pass obj.method does NOT give you a bound method
52pass pass d->key
53pass pass a ++ b for string/list concatenation
54pass pass s ~~ glob and s !~~ glob
55pass pass Exact equality with === and !==
56pass pass Approximate equality of Str x {Str, Int, Bool} with ~==
57pass pass Wrong Types with ~==
58FAIL FAIL Equality of ~== with Float (deferred)
detailsdetails
108 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

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

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

stdout:
stderr: 
  echo $range(10, 15, 2)
  ^~~~
[ stdin ]:2: fatal: Expected function to return a bool, int, float, or string.  Got <type 'xrange'>
osh_ALT13 Wrong sigil $range() shows representation of iterator?

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

stdout:
stderr: 
  echo $range(10, 15, 2)
  ^~~~
[ stdin ]:2: fatal: Expected function to return a bool, int, float, or string.  Got <type 'xrange'>
osh14 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 358, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 301, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 261, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 681, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 324, 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 1498, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, 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 2089, in EvalWordSequence2
    return self.SimpleEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 2049, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, part_vals, 0)  # not quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1652, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1604, in _EvalWordPart
    a = [_Stringify(item) for item in func(*pos_args, **named_args)]
TypeError: 'int' object is not iterable
osh_ALT14 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 328, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 301, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 292, in AppBundleMain
    return readlink.main(main_argv)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 681, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 330, in Batch
    return status
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1498, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1345, 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 2089, in EvalWordSequence2
    return self.SimpleEvalWordSequence2(words, allow_assign)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 2049, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, part_vals, 0)  # not quoted
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1684, in _EvalWordToParts
    part_vals.append(part_value.String('', quoted, not quoted))
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1617, 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.9.4/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh15 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 358, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 301, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 261, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 681, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 309, in Batch
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2223, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2085, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2004, in ParseAndOr
    return self._ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2015, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1947, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1869, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1607, in ParseCompoundCommand
    n8 = self.w_parser.ParseVarDecl(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1035, 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 314, 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 2259, in ParseCommandSub
    c_list = self._ParseCommandTerm()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2148, in _ParseCommandTerm
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2004, in ParseAndOr
    return self._ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2015, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1947, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1921, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 931, in ParseSimpleCommand
    redirects, words, block = self._ScanSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 664, in _ScanSimpleCommand
    self._Peek()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 533, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1774, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1714, in _ReadWord
    w = self._ReadCompoundWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1447, in _ReadCompoundWord
    return self._ReadCompoundWord3(lex_mode, Id.Undefined_Tok, True)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1507, in _ReadCompoundWord3
    self._ParseCallArguments(arglist)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1364, 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_ALT15 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 328, in _cpython_main_hook
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 301, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 292, in AppBundleMain
    return readlink.main(main_argv)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 681, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 309, in Batch
    node = c_parser.ParseLogicalLine()  # can raise ParseError
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2223, in ParseLogicalLine
    node = self._ParseCommandLine()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2085, in _ParseCommandLine
    child = self.ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2004, in ParseAndOr
    return self._ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2015, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1947, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1869, in ParseCommand
    return self.ParseCompoundCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1607, in ParseCompoundCommand
    n8 = self.w_parser.ParseVarDecl(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1035, 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 314, in Parse
    lexer)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_parse.py", line 294, in _PushOilTokens
    raise parse.ParseError("incomplete input", tok.id, tok)
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2259, in ParseCommandSub
    c_list = self._ParseCommandTerm()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2191, in _ParseCommandTerm
    return command.CommandList(children)
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2004, in ParseAndOr
    return self._ParseAndOr()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 2015, in _ParseAndOr
    child = self.ParsePipeline()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1947, in ParsePipeline
    child = self.ParseCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 1921, in ParseCommand
    return self.ParseSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 931, in ParseSimpleCommand
    redirects, words, block = self._ScanSimpleCommand()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 664, in _ScanSimpleCommand
    self._Peek()
  File "/home/andy/git/oilshell/oil/osh/cmd_parse.py", line 533, in _Peek
    w = self.w_parser.ReadWord(self.next_lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1774, in ReadWord
    w, need_more = self._ReadWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1714, in _ReadWord
    w = self._ReadCompoundWord(lex_mode)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1447, in _ReadCompoundWord
    return self._ReadCompoundWord3(lex_mode, Id.Undefined_Tok, True)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1592, in _ReadCompoundWord3
    word=w)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 1364, 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.9.4/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh31 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_ALT31 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)
osh58 Equality of ~== with Float (deferred)

[osh status] Expected 0, got 1

stdout:
stderr: 
  if (42 ~== 42.0) {
         ^~~
[ stdin ]:3: fatal: ~== expects a string on the left
osh_ALT58 Equality of ~== with Float (deferred)

[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
  if (42 ~== 42.0) {
         ^~~
[ stdin ]:3: fatal: ~== expects a string on the left