TestCaptureUserOut ensures capturing of stdout works as expected.
(t *testing.T)
| 93 | |
| 94 | // TestCaptureUserOut ensures capturing of stdout works as expected. |
| 95 | func TestCaptureUserOut(t *testing.T) { |
| 96 | assert := asrt.New(t) |
| 97 | restoreOutput := util.CaptureUserOut() |
| 98 | text := util.RandString(128) |
| 99 | output.UserOut.Println(text) |
| 100 | out := restoreOutput() |
| 101 | |
| 102 | assert.Contains(out, text) |
| 103 | } |
| 104 | |
| 105 | // TestCaptureStdOut ensures capturing of stdout works as expected. |
| 106 | func TestCaptureStdOut(t *testing.T) { |
nothing calls this directly
no test coverage detected