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

Function expectSuccess

args_test.go:35–42  ·  view source on GitHub ↗
(output string, err error, t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func expectSuccess(output string, err error, t *testing.T) {
36 if output != "" {
37 t.Errorf("Unexpected output: %v", output)
38 }
39 if err != nil {
40 t.Fatalf("Unexpected error: %v", err)
41 }
42}
43
44func validOnlyWithInvalidArgs(err error, t *testing.T) {
45 if err == nil {

Callers 15

TestNoArgsFunction · 0.85
TestOnlyValidArgsFunction · 0.85
TestArbitraryArgsFunction · 0.85
TestMinimumNArgsFunction · 0.85
TestMaximumNArgsFunction · 0.85
TestExactArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected