Results for ysh-regex-api.test.sh

statusosh
pass 31
FAIL 2
total33
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
4pass Positional captures with _group
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
15FAIL Capture with Type Conversion Func
details
16FAIL Named Capture with Type Conversion Func
details
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
31 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

osh15 Capture with Type Conversion Func

[osh stdout] Expected 'Int Float\nInt Float\n', got 'Int Float\n'
[osh status] Expected 0, got 3

stdout:
Int Float
stderr:
    echo $[m => group(1) => type()] $[m => group(2) => type()]
                            ^~~~
[ stdin ]:14: fatal: Fat arrow => expects method or function, got BuiltinFunc
osh16 Named Capture with Type Conversion Func

[osh stdout] Expected '-3.14\nInt Float\n-3.14\nInt Float\n', got '-3.14\nInt Float\n-3.14\n'
[osh status] Expected 0, got 3

stdout:
-3.14
Int Float
-3.14
stderr:
    echo $[m => group('left') => type()] $[m => group('right') => type()]
                                 ^~~~
[ stdin ]:20: fatal: Fat arrow => expects method or function, got BuiltinFunc