From e4fcdc25571ff04262541607ca4677bfb8a3aa72 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 19 Oct 2014 20:28:31 -0400 Subject: more tests --- t/escape_test.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 t/escape_test.py (limited to 't') 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) -- cgit v1.2.3