Start supporting the REP escape sequence

This commit is contained in:
Fredrik Fornwall
2017-08-13 16:14:31 +02:00
parent d7520642de
commit edc92bbcbb
2 changed files with 16 additions and 0 deletions

View File

@@ -35,4 +35,12 @@ public class ControlSequenceIntroducerTest extends TerminalTestCase {
withTerminalSized(3, 2).enterString("\033[0;38;2;255;255;255;48;2;0;0;0;1;2;3;4;5;7;8;9mabc").assertLinesAre("abc", " ");
}
/** CSI Ps b Repeat the preceding graphic character Ps times (REP). */
public void testRepeat() {
withTerminalSized(3, 2).enterString("a\033[b").assertLinesAre("aa ", " ");
withTerminalSized(3, 2).enterString("a\033[2b").assertLinesAre("aaa", " ");
// When no char has been output we ignore REP:
withTerminalSized(3, 2).enterString("\033[b").assertLinesAre(" ", " ");
}
}