MCPcopy
hub / github.com/spf13/cobra / check

Function check

bash_completions_test.go:33–37  ·  view source on GitHub ↗
(t *testing.T, found, expected string)

Source from the content-addressed store, hash-verified

31}
32
33func check(t *testing.T, found, expected string) {
34 if !strings.Contains(found, expected) {
35 t.Errorf("Expecting to contain: \n %q\nGot:\n %q\n", expected, found)
36 }
37}
38
39func checkNumOccurrences(t *testing.T, found, expected string, expectedOccurrences int) {
40 numOccurrences := strings.Count(found, expected)

Calls

no outgoing calls

Tested by

no test coverage detected