TestDECSTBMv3 top and bottom
(t *testing.T)
| 96 | |
| 97 | // TestDECSTBMv3 top and bottom |
| 98 | func TestDECSTBMv3(t *testing.T) { |
| 99 | term := vt.NewMockTerm(vt.MockOptSize{X: 8, Y: 4}) |
| 100 | defer MustClose(t, term) |
| 101 | MustStart(t, term) |
| 102 | |
| 103 | WriteF(t, term, "\033[1;1H") // move to top-left |
| 104 | WriteF(t, term, "\033[0J") // clear screen |
| 105 | WriteF(t, term, "ABC\r\n") |
| 106 | WriteF(t, term, "DEF\r\n") |
| 107 | WriteF(t, term, "GHI\r\n") |
| 108 | WriteF(t, term, "\033[1;2r") // scroll region top/bottom |
| 109 | WriteF(t, term, "\033[T") // scroll down one |
| 110 | |
| 111 | // |________| |
| 112 | // |ABC_____| |
| 113 | // |GHI_____| |
| 114 | // |________| |
| 115 | CheckPos(t, term, 0, 0) |
| 116 | CheckContent(t, term, 0, 0, "") |
| 117 | CheckContent(t, term, 1, 0, "") |
| 118 | CheckContent(t, term, 2, 0, "") |
| 119 | CheckContent(t, term, 0, 1, "A") |
| 120 | CheckContent(t, term, 1, 1, "B") |
| 121 | CheckContent(t, term, 2, 1, "C") |
| 122 | CheckContent(t, term, 0, 2, "G") |
| 123 | CheckContent(t, term, 1, 2, "H") |
| 124 | CheckContent(t, term, 2, 2, "I") |
| 125 | CheckContent(t, term, 0, 3, "") |
| 126 | CheckContent(t, term, 1, 3, "") |
| 127 | CheckContent(t, term, 2, 3, "") |
| 128 | } |
| 129 | |
| 130 | // TestDECSTBMv4 top == bottom |
| 131 | func TestDECSTBMv4(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…