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

Function Test_ShowRootCommandHelp_NoVersion

help_test.go:28–39  ·  help_test.go::Test_ShowRootCommandHelp_NoVersion
(t *testing.T)

Source from the content-addressed store, hash-verified

26}
27
28func Test_ShowRootCommandHelp_NoVersion(t *testing.T) {
29 output := new(bytes.Buffer)
30 cmd := &Command{Writer: output}
31
32 cmd.Version = ""
33
34 _ = ShowRootCommandHelp(cmd)
35
36 if bytes.Contains(output.Bytes(), []byte("VERSION:")) {
37 t.Errorf("expected\n%snot to include %s", output.String(), "VERSION:")
38 }
39}
40
41func Test_ShowRootCommandHelp_HideVersion(t *testing.T) {
42 output := new(bytes.Buffer)

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected