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

Function TestRule_MatchStar

internal/waf/rule_test.go:526–539  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

524}
525
526func TestRule_MatchStar(t *testing.T) {
527 {
528 rule := NewRule()
529 rule.Operator = RuleOperatorMatch
530 rule.Value = `/\*(!|\x00)`
531 err := rule.Init()
532 if err != nil {
533 t.Fatal(err)
534 }
535 t.Log(rule.Test("/*!"))
536 t.Log(rule.Test(url.QueryEscape("/*!")))
537 t.Log(url.QueryEscape("/*!"))
538 }
539}
540
541func TestRule_SetCheckpointFinder(t *testing.T) {
542 {

Callers

nothing calls this directly

Calls 4

InitMethod · 0.95
TestMethod · 0.95
LogMethod · 0.80
NewRuleFunction · 0.70

Tested by

no test coverage detected