Regexp asserts that a specified regexp matches a string. a.Regexp(regexp.MustCompile("start"), "it's starting") a.Regexp("start...$", "it's not starting")
(rx interface{}, str interface{}, msgAndArgs ...interface{})
| 1463 | // a.Regexp(regexp.MustCompile("start"), "it's starting") |
| 1464 | // a.Regexp("start...$", "it's not starting") |
| 1465 | func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { |
| 1466 | if h, ok := a.t.(tHelper); ok { |
| 1467 | h.Helper() |
| 1468 | } |
| 1469 | Regexp(a.t, rx, str, msgAndArgs...) |
| 1470 | } |
| 1471 | |
| 1472 | // Regexpf asserts that a specified regexp matches a string. |
| 1473 | // |