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

Function TestMaximumNArgs

args_test.go:234–238  ·  view source on GitHub ↗

MaximumNArgs

(t *testing.T)

Source from the content-addressed store, hash-verified

232// MaximumNArgs
233
234func TestMaximumNArgs(t *testing.T) {
235 c := getCommand(MaximumNArgs(3), false)
236 output, err := executeCommand(c, "a", "b")
237 expectSuccess(output, err, t)
238}
239
240func TestMaximumNArgs_WithValid(t *testing.T) {
241 c := getCommand(MaximumNArgs(2), true)

Callers

nothing calls this directly

Calls 4

getCommandFunction · 0.85
MaximumNArgsFunction · 0.85
executeCommandFunction · 0.85
expectSuccessFunction · 0.85

Tested by

no test coverage detected