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

Function TestMinimumNArgs_WithValid__WithInvalidArgs

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

Source from the content-addressed store, hash-verified

194}
195
196func TestMinimumNArgs_WithValid__WithInvalidArgs(t *testing.T) {
197 c := getCommand(MinimumNArgs(2), true)
198 output, err := executeCommand(c, "a", "b")
199 expectSuccess(output, err, t)
200}
201
202func TestMinimumNArgs_WithValidOnly_WithInvalidArgs(t *testing.T) {
203 c := getCommand(MatchAll(OnlyValidArgs, MinimumNArgs(2)), true)

Callers

nothing calls this directly

Calls 4

getCommandFunction · 0.85
MinimumNArgsFunction · 0.85
executeCommandFunction · 0.85
expectSuccessFunction · 0.85

Tested by

no test coverage detected