MCPcopy Index your code
hub / github.com/GoEdgeLab/EdgeNode / TestRegexp_MatchString

Function TestRegexp_MatchString

internal/re/regexp_test.go:24–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

22}
23
24func TestRegexp_MatchString(t *testing.T) {
25 var a = assert.NewAssertion(t)
26
27 {
28 var r = re.MustCompile("abc")
29 a.IsTrue(r.MatchString("abc"))
30 a.IsFalse(r.MatchString("ab"))
31 a.IsFalse(r.MatchString("ABC"))
32 }
33
34 {
35 var r = re.MustCompile("(?i)abc|def|ghi")
36 a.IsTrue(r.MatchString("DEF"))
37 a.IsFalse(r.MatchString("ab"))
38 a.IsTrue(r.MatchString("ABC"))
39 }
40}
41
42func TestRegexp_Sub(t *testing.T) {
43 {

Callers

nothing calls this directly

Calls 2

MustCompileFunction · 0.92
MatchStringMethod · 0.80

Tested by

no test coverage detected