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

Function TestExactValidArgs_WithInvalidArgs

args_test.go:508–512  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

506}
507
508func TestExactValidArgs_WithInvalidArgs(t *testing.T) {
509 c := getCommand(ExactValidArgs(2), true)
510 _, err := executeCommand(c, "three", "a")
511 validOnlyWithInvalidArgs(err, t)
512}
513
514// This test make sure we keep backwards-compatibility with respect
515// to the legacyArgs() function.

Callers

nothing calls this directly

Calls 4

getCommandFunction · 0.85
ExactValidArgsFunction · 0.85
executeCommandFunction · 0.85
validOnlyWithInvalidArgsFunction · 0.85

Tested by

no test coverage detected