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

Function TestExactArgs

args_test.go:284–288  ·  view source on GitHub ↗

ExactArgs

(t *testing.T)

Source from the content-addressed store, hash-verified

282// ExactArgs
283
284func TestExactArgs(t *testing.T) {
285 c := getCommand(ExactArgs(3), false)
286 output, err := executeCommand(c, "a", "b", "c")
287 expectSuccess(output, err, t)
288}
289
290func TestExactArgs_WithValid(t *testing.T) {
291 c := getCommand(ExactArgs(3), true)

Callers

nothing calls this directly

Calls 4

getCommandFunction · 0.85
ExactArgsFunction · 0.85
executeCommandFunction · 0.85
expectSuccessFunction · 0.85

Tested by

no test coverage detected