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

Method expectMatchContextFunc

pty/ptytest/ptytest.go:163–170  ·  view source on GitHub ↗
(str string, fn func(ctx context.Context, str string) string)

Source from the content-addressed store, hash-verified

161}
162
163func (e *outExpecter) expectMatchContextFunc(str string, fn func(ctx context.Context, str string) string) string {
164 e.t.Helper()
165
166 timeout, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
167 defer cancel()
168
169 return fn(timeout, str)
170}
171
172// TODO(mafredri): Rename this to ExpectMatch when refactoring.
173func (e *outExpecter) ExpectMatchContext(ctx context.Context, str string) string {

Callers 2

ExpectMatchMethod · 0.95
ExpectRegexMatchMethod · 0.95

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected