MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestMatchStringCache

Function TestMatchStringCache

internal/waf/utils/utils_test.go:17–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15)
16
17func TestMatchStringCache(t *testing.T) {
18 regex := re.MustCompile(`\d+`)
19 t.Log(utils.MatchStringCache(regex, "123", utils.CacheShortLife))
20 t.Log(utils.MatchStringCache(regex, "123", utils.CacheShortLife))
21 t.Log(utils.MatchStringCache(regex, "123", utils.CacheShortLife))
22}
23
24func TestMatchBytesCache(t *testing.T) {
25 regex := re.MustCompile(`\d+`)

Callers

nothing calls this directly

Calls 3

MustCompileFunction · 0.92
MatchStringCacheFunction · 0.92
LogMethod · 0.80

Tested by

no test coverage detected