aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-19 20:28:31 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-19 20:28:31 -0400
commite4fcdc25571ff04262541607ca4677bfb8a3aa72 (patch)
treee2dac0db4ff81b35186b36bd2dce265cc099ff35 /t
parent2664c1384cad3c228724721862c7c390c547af47 (diff)
downloadlibvt100-python-e4fcdc25571ff04262541607ca4677bfb8a3aa72.tar.gz
libvt100-python-e4fcdc25571ff04262541607ca4677bfb8a3aa72.zip
more tests
Diffstat (limited to 't')
-rw-r--r--t/escape_test.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/t/escape_test.py b/t/escape_test.py
new file mode 100644
index 0000000..05a5878
--- /dev/null
+++ b/t/escape_test.py
@@ -0,0 +1,26 @@
+from . import VT100Test
+
+class EscapeTest(VT100Test):
+ def test_deckpam(self):
+ assert not self.vt.application_keypad()
+ self.vt.process("\033=")
+ assert self.vt.application_keypad()
+ self.vt.process("\033>")
+ assert not self.vt.application_keypad()
+
+ def test_ri(self):
+ self.vt.process("foo\nbar\033Mbaz")
+ assert self.vt.get_string_plaintext(0, 0, 23, 79) == 'foo baz\n bar' + ('\n' * 23)
+
+ def test_ris(self):
+ pass # XXX
+
+ def test_vb(self):
+ assert not self.vt.seen_visual_bell()
+ self.vt.process("\033g")
+ assert self.vt.seen_visual_bell()
+ assert not self.vt.seen_visual_bell()
+
+ def test_decsc(self):
+ self.vt.process("foo\0337\r\n\r\n\r\n bar\0338baz")
+ assert self.vt.get_string_plaintext(0, 0, 23, 79) == 'foobaz\n\n\n bar' + ('\n' * 21)