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

Function TestMinimumNArgs

args_test.go:184–188  ·  view source on GitHub ↗

MinimumNArgs

(t *testing.T)

Source from the content-addressed store, hash-verified

182// MinimumNArgs
183
184func TestMinimumNArgs(t *testing.T) {
185 c := getCommand(MinimumNArgs(2), false)
186 output, err := executeCommand(c, "a", "b", "c")
187 expectSuccess(output, err, t)
188}
189
190func TestMinimumNArgs_WithValid(t *testing.T) {
191 c := getCommand(MinimumNArgs(2), true)

Callers

nothing calls this directly

Calls 4

getCommandFunction · 0.85
MinimumNArgsFunction · 0.85
executeCommandFunction · 0.85
expectSuccessFunction · 0.85

Tested by

no test coverage detected