MCPcopy Create free account
hub / github.com/pace/bricks / validatePattern

Function validatePattern

pkg/redact/pattern_test.go:13–15  ·  view source on GitHub ↗
(t *testing.T, p *regexp.Regexp, s string, expected bool)

Source from the content-addressed store, hash-verified

11)
12
13func validatePattern(t *testing.T, p *regexp.Regexp, s string, expected bool) {
14 assert.Equal(t, expected, p.MatchString(s), fmt.Sprintf("expected %q to match %v, but didn't", s, p))
15}
16
17func TestIBANPattern(t *testing.T) {
18 validatePattern(t, PatternIBAN, "NL29INGB8731326943", true)

Callers 3

TestIBANPatternFunction · 0.85
TestCreditCardPatternFunction · 0.85
TestPatternJWTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…