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

Function TestMinimumNArgs_WithValidOnly_WithInvalidArgs

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

Source from the content-addressed store, hash-verified

200}
201
202func TestMinimumNArgs_WithValidOnly_WithInvalidArgs(t *testing.T) {
203 c := getCommand(MatchAll(OnlyValidArgs, MinimumNArgs(2)), true)
204 _, err := executeCommand(c, "a", "b")
205 validOnlyWithInvalidArgs(err, t)
206}
207
208func TestMinimumNArgs_WithLessArgs(t *testing.T) {
209 c := getCommand(MinimumNArgs(2), false)

Callers

nothing calls this directly

Calls 5

getCommandFunction · 0.85
MatchAllFunction · 0.85
MinimumNArgsFunction · 0.85
executeCommandFunction · 0.85
validOnlyWithInvalidArgsFunction · 0.85

Tested by

no test coverage detected