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

Function TestMaximumNArgs_WithValidOnly_WithInvalidArgs

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

Source from the content-addressed store, hash-verified

250}
251
252func TestMaximumNArgs_WithValidOnly_WithInvalidArgs(t *testing.T) {
253 c := getCommand(MatchAll(OnlyValidArgs, MaximumNArgs(2)), true)
254 _, err := executeCommand(c, "a", "b")
255 validOnlyWithInvalidArgs(err, t)
256}
257
258func TestMaximumNArgs_WithMoreArgs(t *testing.T) {
259 c := getCommand(MaximumNArgs(2), false)

Callers

nothing calls this directly

Calls 5

getCommandFunction · 0.85
MatchAllFunction · 0.85
MaximumNArgsFunction · 0.85
executeCommandFunction · 0.85
validOnlyWithInvalidArgsFunction · 0.85

Tested by

no test coverage detected