(t *testing.T)
| 85 | } |
| 86 | |
| 87 | func TestGenMdJSONFields(t *testing.T) { |
| 88 | buf := new(bytes.Buffer) |
| 89 | if err := genMarkdownCustom(jsonCmd, buf, nil); err != nil { |
| 90 | t.Fatal(err) |
| 91 | } |
| 92 | output := buf.String() |
| 93 | |
| 94 | checkStringContains(t, output, jsonCmd.Long) |
| 95 | checkStringContains(t, output, jsonCmd.Example) |
| 96 | checkStringContains(t, output, "JSON Fields") |
| 97 | checkStringContains(t, output, "`foo`") |
| 98 | checkStringContains(t, output, "`bar`") |
| 99 | checkStringContains(t, output, "`baz`") |
| 100 | } |
| 101 | |
| 102 | func TestGenMdTree(t *testing.T) { |
| 103 | c := &cobra.Command{Use: "do [OPTIONS] arg1 arg2"} |
nothing calls this directly
no test coverage detected