(t *testing.T)
| 26 | } |
| 27 | |
| 28 | func 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 | |
| 41 | func Test_ShowRootCommandHelp_HideVersion(t *testing.T) { |
| 42 | output := new(bytes.Buffer) |