(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func Test_ShowRootCommandHelp_MultiLineDescription(t *testing.T) { |
| 55 | output := new(bytes.Buffer) |
| 56 | cmd := &Command{Writer: output} |
| 57 | |
| 58 | cmd.HideVersion = true |
| 59 | cmd.Description = "multi\n line" |
| 60 | |
| 61 | _ = ShowRootCommandHelp(cmd) |
| 62 | |
| 63 | if !bytes.Contains(output.Bytes(), []byte("DESCRIPTION:\n multi\n line")) { |
| 64 | t.Errorf("expected\n%s\nto include\n%s", output.String(), "DESCRIPTION:\n multi\n line") |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestShowCommandHelpAndExit(t *testing.T) { |
| 69 | output := new(bytes.Buffer) |