(t *testing.T)
| 42 | } |
| 43 | |
| 44 | func TestGenMdDocWithNoLongOrSynopsis(t *testing.T) { |
| 45 | // We generate on subcommand so we have both subcommands and parents. |
| 46 | buf := new(bytes.Buffer) |
| 47 | if err := GenMarkdown(dummyCmd, buf); err != nil { |
| 48 | t.Fatal(err) |
| 49 | } |
| 50 | output := buf.String() |
| 51 | |
| 52 | checkStringContains(t, output, dummyCmd.Example) |
| 53 | checkStringContains(t, output, dummyCmd.Short) |
| 54 | checkStringContains(t, output, "Options inherited from parent commands") |
| 55 | checkStringOmits(t, output, "### Synopsis") |
| 56 | } |
| 57 | |
| 58 | func TestGenMdNoHiddenParents(t *testing.T) { |
| 59 | // We generate on subcommand so we have both subcommands and parents. |
nothing calls this directly
no test coverage detected