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

Function TestOnlyValidArgs

args_test.go:144–148  ·  view source on GitHub ↗

OnlyValidArgs

(t *testing.T)

Source from the content-addressed store, hash-verified

142// OnlyValidArgs
143
144func TestOnlyValidArgs(t *testing.T) {
145 c := getCommand(OnlyValidArgs, true)
146 output, err := executeCommand(c, "one", "two")
147 expectSuccess(output, err, t)
148}
149
150func TestOnlyValidArgs_WithInvalidArgs(t *testing.T) {
151 c := getCommand(OnlyValidArgs, true)

Callers

nothing calls this directly

Calls 3

getCommandFunction · 0.85
executeCommandFunction · 0.85
expectSuccessFunction · 0.85

Tested by

no test coverage detected