Regexp asserts that a specified regexp matches a string. assert.Regexp(t, regexp.MustCompile("start"), "it's starting") assert.Regexp(t, "start...$", "it's not starting")
(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{})
| 1853 | // assert.Regexp(t, regexp.MustCompile("start"), "it's starting") |
| 1854 | // assert.Regexp(t, "start...$", "it's not starting") |
| 1855 | func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { |
| 1856 | if h, ok := t.(tHelper); ok { |
| 1857 | h.Helper() |
| 1858 | } |
| 1859 | if assert.Regexp(t, rx, str, msgAndArgs...) { |
| 1860 | return |
| 1861 | } |
| 1862 | t.FailNow() |
| 1863 | } |
| 1864 | |
| 1865 | // Regexpf asserts that a specified regexp matches a string. |
| 1866 | // |