Add screen wraparound test

This commit is contained in:
Fredrik Fornwall
2015-11-29 09:36:06 +01:00
parent 525985b1f2
commit 7348820caf

View File

@@ -59,4 +59,15 @@ public class DecSetTest extends TerminalTestCase {
assertEquals("Terminal reset() should disable bracketed paste mode", "a", mOutput.getOutputAndClear()); assertEquals("Terminal reset() should disable bracketed paste mode", "a", mOutput.getOutputAndClear());
} }
/** DECSET 7, DECAWM, controls wraparound mode. */
public void testWrapAroundMode() {
// Default with wraparound:
withTerminalSized(3, 3).enterString("abcd").assertLinesAre("abc", "d ", " ");
// With wraparound disabled:
withTerminalSized(3, 3).enterString("\033[?7labcd").assertLinesAre("abd", " ", " ");
enterString("efg").assertLinesAre("abg", " ", " ");
// Re-enabling wraparound:
enterString("\033[?7hhij").assertLinesAre("abh", "ij ", " ");
}
} }