(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func TestGenManJSONFields(t *testing.T) { |
| 117 | buf := new(bytes.Buffer) |
| 118 | header := &GenManHeader{} |
| 119 | if err := renderMan(jsonCmd, header, buf); err != nil { |
| 120 | t.Fatal(err) |
| 121 | } |
| 122 | |
| 123 | output := buf.String() |
| 124 | |
| 125 | checkStringContains(t, output, translate(jsonCmd.Name())) |
| 126 | checkStringContains(t, output, "JSON FIELDS") |
| 127 | checkStringContains(t, output, "foo") |
| 128 | checkStringContains(t, output, "bar") |
| 129 | checkStringContains(t, output, "baz") |
| 130 | } |
| 131 | |
| 132 | func TestGenManDocExitCodes(t *testing.T) { |
| 133 | header := &GenManHeader{ |
nothing calls this directly
no test coverage detected