(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestGenMdDocWithNoLongOrSynopsis(t *testing.T) { |
| 33 | linkHandler := func(s string) string { return s } |
| 34 | |
| 35 | // We generate on subcommand so we have both subcommands and parents. |
| 36 | buf := new(bytes.Buffer) |
| 37 | if err := genMarkdownCustom(dummyCmd, buf, linkHandler); err != nil { |
| 38 | t.Fatal(err) |
| 39 | } |
| 40 | output := buf.String() |
| 41 | |
| 42 | checkStringContains(t, output, dummyCmd.Example) |
| 43 | checkStringContains(t, output, dummyCmd.Short) |
| 44 | checkStringContains(t, output, "Options inherited from parent commands") |
| 45 | checkStringOmits(t, output, "### Synopsis") |
| 46 | } |
| 47 | |
| 48 | func TestGenMdNoHiddenParents(t *testing.T) { |
| 49 | linkHandler := func(s string) string { return s } |
nothing calls this directly
no test coverage detected