Results for ysh-regex-api.test.sh

statusosh
pass 37
FAIL 1
total38
caseoshdescription
0pass s ~ regex and s !~ regex
1pass Invalid regex has libc error message
2pass Eggex flags to ignore case are respected
3pass Eggex flags to treat newlines as special are respected
4FAIL Positional captures with _group
details
5pass _group() returns null when group doesn't match
6pass _start() and _end()
7pass Str->search() method returns value.Match object
8pass Str->search() only matches %start ^ when pos == 0
9pass search() and leftMatch() accept ERE string
10pass Str.leftMatch() can implement lexer pattern
11pass Named captures with m.group()
12pass Named captures with _group() _start() _end()
13pass Named Capture Decays Without Name
14pass Nested Named Capture Uses ( ordering
15pass Capture with Type Conversion Func
16pass Named Capture with Type Conversion Func
17pass Can't splice eggex with different flags
18pass Eggex with translation preference has arbitrary flags
19pass Invalid sh operation on eggex
20pass Long Python Example
21pass Regex in a loop (bug regression)
22pass Regex in a loop depending on var
23pass Regex with [ (bug regression)
24pass Str.replace(Str, Str)
25pass Str.replace(Eggex, Str)
26pass Str.replace(Eggex, Expr)
27pass Str.replace(*, Expr), $0
28pass Str.replace(Eggex, Expr), scopes
29pass Str.replace(Eggex, *, count)
30pass Str.replace(Str, Str), empty new/old strings
31pass Str.replace(Eggex, Lazy), convert_func
32pass Str.replace(Eggex, *), eflags
33pass Str.replace(Eggex, *), guard against infinite loop
34pass Str.replace(Eggex, *), str cannot contain NUL bytes
35pass Str.replace() at top level
36pass Str.replace() lexical scope with ^""
37pass Str.replace() lexical scope with ^[]
37 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh4 Positional captures with _group

[osh stdout] Expected "['2020-08', '2020', '08']\n['2020-08', '2020', '08']\n['2020-08', '2020', '08']\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 202, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 171, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 141, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1253, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 401, in Batch2
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2175, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1974, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1837, in _Dispatch
    status = self._DoIf(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1487, in _DoIf
    status = self._ExecuteList(if_arm.action)
  File "/home/uke/oil/osh/cmd_eval.py", line 2051, in _ExecuteList
    status = self._Execute(child)
  File "/home/uke/oil/osh/cmd_eval.py", line 1974, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1701, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 904, in _DoSimple
    allow_assign=True)
  File "/home/uke/oil/osh/word_eval.py", line 2519, in EvalWordSequence2
    allow_assign)
  File "/home/uke/oil/osh/word_eval.py", line 2480, in SimpleEvalWordSequence2
    self._EvalWordToParts(w, part_vals, 0)  # not quoted
  File "/home/uke/oil/osh/word_eval.py", line 2048, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/uke/oil/osh/word_eval.py", line 1932, in _EvalWordPart
    self._EvalDoubleQuoted(part.parts, part_vals)
  File "/home/uke/oil/osh/word_eval.py", line 1453, in _EvalDoubleQuoted
    self._EvalWordPart(p, part_vals, QUOTED)
  File "/home/uke/oil/osh/word_eval.py", line 1956, in _EvalWordPart
    self._EvalBracedVarSub(part, part_vals, quoted)
  File "/home/uke/oil/osh/word_eval.py", line 1750, in _EvalBracedVarSub
    part_val = _ValueToPartValue(val, quoted or quoted2, part)
  File "/home/uke/oil/osh/word_eval.py", line 231, in _ValueToPartValue
    bash_impl.InternalStringArray_GetValues(val), quoted)
NameError: global name 'bash_impl' is not defined