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

Function TestExactArgs_WithInvalidCount_WithValid_WithInvalidArgs

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

Source from the content-addressed store, hash-verified

318}
319
320func TestExactArgs_WithInvalidCount_WithValid_WithInvalidArgs(t *testing.T) {
321 c := getCommand(ExactArgs(2), true)
322 _, err := executeCommand(c, "three", "a", "two")
323 exactArgsWithInvalidCount(err, t)
324}
325
326func TestExactArgs_WithInvalidCount_WithValidOnly_WithInvalidArgs(t *testing.T) {
327 c := getCommand(MatchAll(OnlyValidArgs, ExactArgs(2)), true)

Callers

nothing calls this directly

Calls 4

getCommandFunction · 0.85
ExactArgsFunction · 0.85
executeCommandFunction · 0.85

Tested by

no test coverage detected