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

Function maximumNArgsWithMoreArgs

args_test.go:77–86  ·  view source on GitHub ↗
(err error, t *testing.T)

Source from the content-addressed store, hash-verified

75}
76
77func maximumNArgsWithMoreArgs(err error, t *testing.T) {
78 if err == nil {
79 t.Fatal("Expected an error")
80 }
81 got := err.Error()
82 expected := "accepts at most 2 arg(s), received 3"
83 if got != expected {
84 t.Fatalf("Expected %q, got %q", expected, got)
85 }
86}
87
88func exactArgsWithInvalidCount(err error, t *testing.T) {
89 if err == nil {

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected