MCPcopy
hub / github.com/expr-lang/expr / Regexpf

Function Regexpf

internal/testify/assert/assertion_format.go:739–744  ·  view source on GitHub ↗

Regexpf asserts that a specified regexp matches a string. assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted")

(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

737// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
738// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted")
739func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool {
740 if h, ok := t.(tHelper); ok {
741 h.Helper()
742 }
743 return Regexp(t, rx, str, append([]interface{}{msg}, args...)...)
744}
745
746// Samef asserts that two pointers reference the same object.
747//

Callers 2

RegexpfFunction · 0.92
RegexpfMethod · 0.70

Calls 2

RegexpFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…