aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-21 14:53:57 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-21 14:53:57 -0400
commit9971a7d049f1d077694f2beb7eda06cc1c2f67bf (patch)
tree35fc1363ea2555ff508b026d20ab7cd0b4015064
parentdd00e1725bf79b0a0759690a229a78f1d94c1054 (diff)
downloadlibvt100-python-9971a7d049f1d077694f2beb7eda06cc1c2f67bf.tar.gz
libvt100-python-9971a7d049f1d077694f2beb7eda06cc1c2f67bf.zip
more tests
-rw-r--r--t/csi_test.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/csi_test.py b/t/csi_test.py
index 6b45dcf..689efbe 100644
--- a/t/csi_test.py
+++ b/t/csi_test.py
@@ -156,3 +156,27 @@ class CSITest(VT100Test):
self.process("\033[1;2H\033[?K")
assert self.vt.get_string_plaintext(0, 0, 500, 500) == 'f' + ("\n" * 4) + ' bar' + ("\n" * 5) + ' baz' + ("\n" * 15)
+
+ def test_ich_dch(self):
+ assert self.vt.get_string_plaintext(0, 0, 500, 500) == ("\n" * 24)
+
+ self.process("\033[10;10Hfoobar")
+ assert self.vt.get_string_plaintext(0, 0, 500, 500) == ("\n" * 9) + ' foobar' + ("\n" * 15)
+
+ self.process("\033[10;12H\033[3@")
+ assert self.vt.get_string_plaintext(0, 0, 500, 500) == ("\n" * 9) + ' fo obar' + ("\n" * 15)
+ assert self.vt.cursor_pos() == (9, 11)
+
+ self.process("\033[4P")
+ assert self.vt.get_string_plaintext(0, 0, 500, 500) == ("\n" * 9) + ' fobar' + ("\n" * 15)
+ assert self.vt.cursor_pos() == (9, 11)
+
+ self.process("\033[100@")
+ assert self.vt.get_string_plaintext(0, 0, 500, 500) == ("\n" * 9) + ' fo' + ("\n" * 15)
+ assert self.vt.cursor_pos() == (9, 11)
+
+ self.process("obar")
+ assert self.vt.get_string_plaintext(0, 0, 500, 500) == ("\n" * 9) + ' foobar' + ("\n" * 15)
+
+ self.process("\033[10;12H\033[100P")
+ assert self.vt.get_string_plaintext(0, 0, 500, 500) == ("\n" * 9) + ' fo' + ("\n" * 15)