MCPcopy
hub / github.com/cli/cli / TestMinimumArgs

Function TestMinimumArgs

pkg/cmdutil/args_test.go:13–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestMinimumArgs(t *testing.T) {
14 tests := []struct {
15 N int
16 Args []string
17 }{
18 {
19 N: 1,
20 Args: []string{"v1.2.3"},
21 },
22 {
23 N: 2,
24 Args: []string{"v1.2.3", "cli/cli"},
25 },
26 }
27
28 for _, test := range tests {
29 if got := MinimumArgs(test.N, "")(nil, test.Args); got != nil {
30 t.Errorf("Got: %v, Want: (nil)", got)
31 }
32 }
33}
34
35func TestMinimumNs_with_error(t *testing.T) {
36 tests := []struct {

Callers

nothing calls this directly

Calls 2

MinimumArgsFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected