(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestStopAlternateScreenBuffer(t *testing.T) { |
| 11 | ios, _, stdout, _ := Test() |
| 12 | ios.SetAlternateScreenBufferEnabled(true) |
| 13 | |
| 14 | ios.StartAlternateScreenBuffer() |
| 15 | fmt.Fprint(ios.Out, "test") |
| 16 | ios.StopAlternateScreenBuffer() |
| 17 | |
| 18 | // Stopping a subsequent time should no-op. |
| 19 | ios.StopAlternateScreenBuffer() |
| 20 | |
| 21 | const want = "\x1b[?1049htest\x1b[?1049l" |
| 22 | if got := stdout.String(); got != want { |
| 23 | t.Errorf("after IOStreams.StopAlternateScreenBuffer() got %q, want %q", got, want) |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func TestIOStreams_pager(t *testing.T) { |
| 28 | t.Skip("TODO: fix this test in race detection mode") |
nothing calls this directly
no test coverage detected