testDoesNotOutput can be used, to test that something does not output anything to stdout.
(t *testing.T, logic func(w io.Writer))
| 195 | |
| 196 | // testDoesNotOutput can be used, to test that something does not output anything to stdout. |
| 197 | func testDoesNotOutput(t *testing.T, logic func(w io.Writer)) { |
| 198 | testza.AssertZero(t, captureStdout(logic)) |
| 199 | pterm.DisableStyling() |
| 200 | testza.AssertZero(t, captureStdout(logic)) |
| 201 | pterm.EnableStyling() |
| 202 | } |
| 203 | |
| 204 | var outBuf bytes.Buffer |
| 205 |
no test coverage detected
searching dependent graphs…