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

Function TestArgsMinGtMax

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

Source from the content-addressed store, hash-verified

31}
32
33func TestArgsMinGtMax(t *testing.T) {
34 arg := &StringArgs{
35 Name: "sa",
36 Value: "foo",
37 Min: 2,
38 Max: 1,
39 }
40
41 cmd := buildMinimalTestCommand()
42 cmd.Arguments = []Argument{arg}
43
44 err := cmd.Run(buildTestContext(t), []string{"foo", "bar"})
45 require.ErrorContains(t, err, "args sa has min[2] > max[1], not parsing argument")
46}
47
48func TestArgsFloatTypes(t *testing.T) {
49 cmd := buildMinimalTestCommand()

Callers

nothing calls this directly

Calls 3

buildMinimalTestCommandFunction · 0.85
buildTestContextFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected