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

Function TestMaximumNArgs_WithMoreArgs_WithValid_WithInvalidArgs

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

Source from the content-addressed store, hash-verified

268}
269
270func TestMaximumNArgs_WithMoreArgs_WithValid_WithInvalidArgs(t *testing.T) {
271 c := getCommand(MaximumNArgs(2), true)
272 _, err := executeCommand(c, "a", "b", "c")
273 maximumNArgsWithMoreArgs(err, t)
274}
275
276func TestMaximumNArgs_WithMoreArgs_WithValidOnly_WithInvalidArgs(t *testing.T) {
277 c := getCommand(MatchAll(OnlyValidArgs, MaximumNArgs(2)), true)

Callers

nothing calls this directly

Calls 4

getCommandFunction · 0.85
MaximumNArgsFunction · 0.85
executeCommandFunction · 0.85
maximumNArgsWithMoreArgsFunction · 0.85

Tested by

no test coverage detected