MCPcopy
hub / github.com/urfave/cli / TestArgsMaxNotSet

Function TestArgsMaxNotSet

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

Source from the content-addressed store, hash-verified

18}
19
20func TestArgsMaxNotSet(t *testing.T) {
21 arg := &StringArgs{
22 Name: "sa",
23 Value: "foo",
24 }
25
26 cmd := buildMinimalTestCommand()
27 cmd.Arguments = []Argument{arg}
28
29 err := cmd.Run(buildTestContext(t), []string{"foo", "bar"})
30 require.ErrorContains(t, err, "args sa has max 0, not parsing argument")
31}
32
33func TestArgsMinGtMax(t *testing.T) {
34 arg := &StringArgs{

Callers

nothing calls this directly

Calls 3

buildMinimalTestCommandFunction · 0.85
buildTestContextFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected