MCPcopy Create free account
hub / github.com/pkg/profile / validateOutput

Function validateOutput

profile_test.go:263–271  ·  view source on GitHub ↗

validatedOutput validates the given slice of lines against data from the given reader.

(r io.Reader, want []string)

Source from the content-addressed store, hash-verified

261
262// validatedOutput validates the given slice of lines against data from the given reader.
263func validateOutput(r io.Reader, want []string) bool {
264 s := bufio.NewScanner(r)
265 for _, line := range want {
266 if !s.Scan() || !strings.Contains(s.Text(), line) {
267 return false
268 }
269 }
270 return true
271}
272
273var validateOutputTests = []struct {
274 input string

Callers 2

StderrFunction · 0.85
TestValidateOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…