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

Function TestExactArgs_WithValidOnly_WithInvalidArgs

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

Source from the content-addressed store, hash-verified

300}
301
302func TestExactArgs_WithValidOnly_WithInvalidArgs(t *testing.T) {
303 c := getCommand(MatchAll(OnlyValidArgs, ExactArgs(3)), true)
304 _, err := executeCommand(c, "three", "a", "two")
305 validOnlyWithInvalidArgs(err, t)
306}
307
308func TestExactArgs_WithInvalidCount(t *testing.T) {
309 c := getCommand(ExactArgs(2), false)

Callers

nothing calls this directly

Calls 5

getCommandFunction · 0.85
MatchAllFunction · 0.85
ExactArgsFunction · 0.85
executeCommandFunction · 0.85
validOnlyWithInvalidArgsFunction · 0.85

Tested by

no test coverage detected