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

Function exactArgsWithInvalidCount

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

Source from the content-addressed store, hash-verified

86}
87
88func exactArgsWithInvalidCount(err error, t *testing.T) {
89 if err == nil {
90 t.Fatal("Expected an error")
91 }
92 got := err.Error()
93 expected := "accepts 2 arg(s), received 3"
94 if got != expected {
95 t.Fatalf("Expected %q, got %q", expected, got)
96 }
97}
98
99func rangeArgsWithInvalidCount(err error, t *testing.T) {
100 if err == nil {

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected