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

Function TestSetErr

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

Source from the content-addressed store, hash-verified

2143}
2144
2145func TestSetErr(t *testing.T) {
2146 c := &Command{}
2147 c.SetErr(nil)
2148 if out := c.ErrOrStderr(); out != os.Stderr {
2149 t.Errorf("Expected setting error to nil to revert back to stderr")
2150 }
2151}
2152
2153func TestSetIn(t *testing.T) {
2154 c := &Command{}

Callers

nothing calls this directly

Calls 2

SetErrMethod · 0.95
ErrOrStderrMethod · 0.95

Tested by

no test coverage detected