Results for oil-regex.test.sh

statusosh
pass 41
FAIL 4
total45
caseoshdescription
0pass /^.$/
1pass /.+/
2pass Positional captures with _match
3pass s ~ regex and s !~ regex
4FAIL _start() and _end()
details
5pass Repeat {1,3} etc.
6pass d+ digit+ !d+ !digit+
7pass Alternation and sequence
8pass Char Class Ranges
9pass Char Class Set
10pass Range with escaped characters
11pass Group ()
12pass Capture is acceptable as a group
13FAIL Named captures with _match
details
14pass Named Capture Decays Without Name
15FAIL Named Capture With ~ Assigns Variable
details
16pass literal ''
17pass double quoted, $x, and ${x}
18pass @splice
19pass splice with capital letters
20pass Matching escaped tab character
21pass Match unicode char
22FAIL Match non-ASCII byte denoted using $'\xff' (TODO: LANG=C)
details
23pass Match non-ASCII byte denoted using \xff
24pass ERE can express Unicode escapes that are in the ASCII range
25pass ERE can't express higher Unicode escapes
26pass non-ASCII bytes must be singleton terms, e.g. '\x7f\xff' is disallowed
27pass Matching escaped tab character
28pass Repeated String Literal With Single Char
29pass Error when unparenthesized string of more than one character is repeated
30pass Instead of $'foo\\bar' use 'foo' \\ 'bar'
31pass Negation of Character Class ![a-z]
32pass Posix and Perl class in class literals
33pass [!d] can't be negated because it's a literal character
34pass [!digit] can't be negated in POSIX ERE (but yes in Perl)
35pass Long Python Example
36pass Invalid sh operation on eggex
37pass Regex in a loop (bug regression)
38pass Regex in a loop depending on var
39pass Regex with [ (bug regression)
40pass Operator chars in char classes (bash-like)
41pass Operator chars in char classes (eggex)
42pass Matching ] and \ and ' and " in character classes
43pass Matching literal hyphen in character classes
44pass Char class special: ^ - ] \
41 passed, 0 OK, 0 not implemented, 0 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

osh4 _start() and _end()

[osh stdout] Expected 'start=3 end=6\nstart=3 end=6\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 225, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 200, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 147, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 707, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 348, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 1720, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1544, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1424, in _Dispatch
    status = self._ExecuteList(if_arm.action)
  File "/home/uke/oil/osh/cmd_eval.py", line 1623, in _ExecuteList
    status = self._Execute(child)
  File "/home/uke/oil/osh/cmd_eval.py", line 1544, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 708, in _Dispatch
    cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True)
  File "/home/uke/oil/osh/word_eval.py", line 2118, in EvalWordSequence2
    return self.SimpleEvalWordSequence2(words, allow_assign)
  File "/home/uke/oil/osh/word_eval.py", line 2078, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, part_vals, 0)  # not quoted
  File "/home/uke/oil/osh/word_eval.py", line 1679, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/uke/oil/osh/word_eval.py", line 1630, in _EvalWordPart
    part_val = self.expr_ev.EvalInlineFunc(part)
  File "/home/uke/oil/oil_lang/expr_eval.py", line 323, in EvalInlineFunc
    s = Stringify(func(*pos_args, **named_args), word_part=part)
  File "/home/uke/oil/oil_lang/funcs_builtin.py", line 108, in __call__
    raise NotImplementedError('_start')
NotImplementedError: _start
osh13 Named captures with _match

[osh stdout] Expected "['2020', '08']\n", got ''
[osh status] Expected 0, got 3

stdout:
stderr: 
    argv.py $_match('year') $_match('month')
    ^~~~~~~
[ stdin ]:6: fatal: Type error in expression: Expected an integer, got 'year'
osh15 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 ]:7: fatal: Undefined variable 'month'
osh22 Match non-ASCII byte denoted using $'\xff' (TODO: LANG=C)

[osh stdout] Expected ' 5b ff 5d 0a\nyes\nno\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  var pat = /[ $'\xff' ]/;
               ^~
[ stdin ]:2: fatal: Use unquoted char literal for byte 255, which is >= 128 (avoid confusing a set of bytes with a sequence)