MCPcopy Index your code
hub / github.com/coder/coder / ExpectRegexMatchContext

Method ExpectRegexMatchContext

pty/ptytest/ptytest.go:177–181  ·  view source on GitHub ↗
(ctx context.Context, str string)

Source from the content-addressed store, hash-verified

175}
176
177func (e *outExpecter) ExpectRegexMatchContext(ctx context.Context, str string) string {
178 return e.expectMatcherFunc(ctx, str, func(src, pattern string) bool {
179 return regexp.MustCompile(pattern).MatchString(src)
180 })
181}
182
183func (e *outExpecter) expectMatcherFunc(ctx context.Context, str string, fn func(src, pattern string) bool) string {
184 e.t.Helper()

Callers 2

TestServerFunction · 0.80
TestSSHFunction · 0.80

Calls 2

expectMatcherFuncMethod · 0.95
MustCompileMethod · 0.80

Tested by 2

TestServerFunction · 0.64
TestSSHFunction · 0.64