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

Function TestSetOut

command_test.go:2137–2143  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2135}
2136
2137func TestSetOut(t *testing.T) {
2138 c := &Command{}
2139 c.SetOut(nil)
2140 if out := c.OutOrStdout(); out != os.Stdout {
2141 t.Errorf("Expected setting output to nil to revert back to stdout")
2142 }
2143}
2144
2145func TestSetErr(t *testing.T) {
2146 c := &Command{}

Callers

nothing calls this directly

Calls 2

SetOutMethod · 0.95
OutOrStdoutMethod · 0.95

Tested by

no test coverage detected