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

Function Test_ShowRootCommandHelp_MultiLineDescription

help_test.go:54–66  ·  help_test.go::Test_ShowRootCommandHelp_MultiLineDescription
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func 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
68func TestShowCommandHelpAndExit(t *testing.T) {
69 output := new(bytes.Buffer)

Callers

nothing calls this directly

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected