Results for ysh-regex-api.test.sh

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

osh36 Str.replace() lexical scope with ^""

[osh stdout] Expected '', got '<Expr>\n'
[osh status] Expected 0, got 1

stdout:
<Expr>
stderr:
  var template = ^"[$x $0 $1 $x]"
                    ^~
[ stdin ]:5: fatal: Undefined variable 'x'
osh_ALT36 Str.replace() lexical scope with ^""

[osh_ALT stdout] Expected '', got '<Expr>\n'
[osh_ALT status] Expected 0, got 1

stdout:
<Expr>
stderr:
  var template = ^"[$x $0 $1 $x]"
                    ^~
[ stdin ]:5: fatal: Undefined variable 'x'
osh37 Str.replace() lexical scope with ^[]

[osh stdout] Expected '', got '<Expr>\n'
[osh status] Expected 0, got 1

stdout:
<Expr>
stderr:
  var template = ^['[' ++ x ++ ' ' ++ $0 ++ ' ' ++ $1 ++ ' ' ++ x ++ ']']
                          ^
[ stdin ]:5: fatal: Undefined variable 'x'
osh_ALT37 Str.replace() lexical scope with ^[]

[osh_ALT stdout] Expected '', got '<Expr>\n'
[osh_ALT status] Expected 0, got 1

stdout:
<Expr>
stderr:
  var template = ^['[' ++ x ++ ' ' ++ $0 ++ ' ' ++ $1 ++ ' ' ++ x ++ ']']
                          ^
[ stdin ]:5: fatal: Undefined variable 'x'