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

Function TestRangeArgs_WithValidOnly_WithInvalidArgs

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

Source from the content-addressed store, hash-verified

350}
351
352func TestRangeArgs_WithValidOnly_WithInvalidArgs(t *testing.T) {
353 c := getCommand(MatchAll(OnlyValidArgs, RangeArgs(2, 4)), true)
354 _, err := executeCommand(c, "three", "a", "two")
355 validOnlyWithInvalidArgs(err, t)
356}
357
358func TestRangeArgs_WithInvalidCount(t *testing.T) {
359 c := getCommand(RangeArgs(2, 4), false)

Callers

nothing calls this directly

Calls 5

getCommandFunction · 0.85
MatchAllFunction · 0.85
RangeArgsFunction · 0.85
executeCommandFunction · 0.85
validOnlyWithInvalidArgsFunction · 0.85

Tested by

no test coverage detected