Results for oil-regex.test.sh

statusoshosh_ALT
pass 3131
FAIL 22
total3333
caseoshosh_ALTdescription
0pass pass /^.$/
1pass pass /.+/
2pass pass Repeat {1,3} etc.
3pass pass d+ digit+ ~d+ ~digit+
4pass pass Alternation and sequence
5pass pass Char Class Ranges
6pass pass Char Class Set
7FAIL FAIL Range with escaped characters
detailsdetails
8pass pass Group ()
9pass pass Capture is acceptable as a group
10pass pass Named Capture Decays Without Name
11FAIL FAIL Named Capture With ~ Assigns Variable
detailsdetails
12pass pass literal ''
13pass pass double quoted, $x, and ${x}
14pass pass @splice
15pass pass splice with capital letters
16pass pass Matching escaped tab character
17pass pass Match non-ASCII byte denoted using c'\xff'
18pass pass Match non-ASCII byte denoted using \xff
19pass pass ERE can express Unicode escapes that are in the ASCII range
20pass pass ERE can't express higher Unicode escapes
21pass pass non-ASCII bytes must be singleton terms, e.g. '\x7f\xff' is disallowed
22pass pass Matching escaped tab character
23pass pass Matching ] and \ and ' and " in character classes
24pass pass Matching literal hyphen in character classes
25pass pass Repeated String Literal With Single Char
26pass pass Error when unparenthesized string of more than one character is repeated
27pass pass Instead of c'foo\\bar' use 'foo' \\ 'bar'
28pass pass Negation of Character Class
29pass pass Posix and Perl class in class literals
30pass pass [~d] can't be negated because it's a literal character
31pass pass [~digit] can't be negated in POSIX ERE (but yes in Perl)
32pass pass Long Python Example
62 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh7 Range with escaped characters

[osh stdout] Expected ' 5b 00 2d 0f 5d 0a\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 1470, in ParseCompoundCommand
    return self.w_parser.ParsePlaceMutation(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 864, in ParsePlaceMutation
    enode, last_token = self.parse_ctx.ParsePlaceMutation(kw_token, self.lexer)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 375, in ParsePlaceMutation
    ast_node = self.tr.MakePlaceMutation(pnode)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 674, in MakePlaceMutation
    rhs = self.Expr(children[2])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 434, in Expr
    return self._Tuple(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 221, in _Tuple
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 439, in Expr
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 466, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 470, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 475, in Expr
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 482, in Expr
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 489, in Expr
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 501, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 505, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 509, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 513, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 517, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 521, in Expr
    return self._AssocBinary(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 527, in Expr
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 539, in Expr
    node = self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 430, in Expr
    return self._Atom(children)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 296, in _Atom
    r = self._Regex(children[1])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1266, in _Regex
    return self._Regex(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1282, in _Regex
    r = self._ReAtom(children[i])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1138, in _ReAtom
    return re.ClassLiteral(False, self._ClassLiteral(p_child))
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1061, in _ClassLiteral
    terms = [self._ClassLiteralTerm(c) for c in p_node.children[1:-1]]
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1041, in _ClassLiteralTerm
    start = self._RangeChar(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 955, in _RangeChar
    raise AssertionError('TODO')
AssertionError: TODO
osh_ALT7 Range with escaped characters

[osh_ALT stdout] Expected ' 5b 00 2d 0f 5d 0a\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 1470, in ParseCompoundCommand
    return self.w_parser.ParsePlaceMutation(kw_token)
  File "/home/andy/git/oilshell/oil/osh/word_parse.py", line 864, in ParsePlaceMutation
    enode, last_token = self.parse_ctx.ParsePlaceMutation(kw_token, self.lexer)
  File "/home/andy/git/oilshell/oil/frontend/parse_lib.py", line 375, in ParsePlaceMutation
    ast_node = self.tr.MakePlaceMutation(pnode)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 674, in MakePlaceMutation
    rhs = self.Expr(children[2])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 221, in _Tuple
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 97, in _AssocBinary
    return self.Expr(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 597, in Expr
    return expr.Var(tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 296, in _Atom
    r = self._Regex(children[1])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1266, in _Regex
    return self._Regex(children[0])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1282, in _Regex
    r = self._ReAtom(children[i])
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1138, in _ReAtom
    return re.ClassLiteral(False, self._ClassLiteral(p_child))
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1061, in _ClassLiteral
    terms = [self._ClassLiteralTerm(c) for c in p_node.children[1:-1]]
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 1047, in _ClassLiteralTerm
    return self._NameInClass(children[0].tok, children[1].tok)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_to_ast.py", line 971, in _RangeChar
    p_die(RANGE_POINT_TOO_LONG, token=tok)
AssertionError: TODO
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
osh11 Named Capture With ~ Assigns Variable

[osh stdout] Expected '([[:digit:]]+)\nyes\nTODO MONTH\n', got '([[:digit:]]+)\nyes\n'
[osh status] Expected 0, got 1

stdout:
([[:digit:]]+)
yes
stderr:
    = month
    ^
[ stdin ]:6: fatal: Undefined variable 'month'
osh_ALT11 Named Capture With ~ Assigns Variable

[osh_ALT stdout] Expected '([[:digit:]]+)\nyes\nTODO MONTH\n', got '([[:digit:]]+)\nyes\n'
[osh_ALT status] Expected 0, got 1

stdout:
([[:digit:]]+)
yes
stderr:
    = month
    ^
[ stdin ]:6: fatal: Undefined variable 'month'