Update pending mode escape code parsing to match latest shed color

This commit is contained in:
Kovid Goyal
2018-07-28 10:56:34 +05:30
parent bd4831e2ee
commit 3df78de3f8
3 changed files with 44 additions and 36 deletions

View File

@@ -232,23 +232,24 @@ class TestParser(BaseTest):
timeout = 0.1
s.set_pending_timeout(timeout)
pb = partial(self.parse_bytes_dump, s)
pb('\033P=s\033\\', ('screen_start_pending_mode',))
pb('\033P=1s\033\\', ('screen_start_pending_mode',))
pb('a')
self.ae(str(s.line(0)), '')
pb('\033P=\033\\', ('screen_stop_pending_mode',), ('draw', 'a'))
pb('\033P=2s\033\\', ('screen_stop_pending_mode',), ('draw', 'a'))
self.ae(str(s.line(0)), 'a')
pb('\033P=s\033\\', ('screen_start_pending_mode',))
pb('\033P=1s\033\\', ('screen_start_pending_mode',))
pb('b')
self.ae(str(s.line(0)), 'a')
time.sleep(timeout)
pb('c', ('draw', 'bc'))
self.ae(str(s.line(0)), 'abc')
pb('\033P=s\033\\d', ('screen_start_pending_mode',))
pb('\033P=\033\\', ('screen_stop_pending_mode',), ('draw', 'd'))
pb('\033P=s\033\\e', ('screen_start_pending_mode',))
pb('\033P'), pb('=')
pb('\033P=1s\033\\d', ('screen_start_pending_mode',))
pb('\033P=2s\033\\', ('screen_stop_pending_mode',), ('draw', 'd'))
pb('\033P=1s\033\\e', ('screen_start_pending_mode',))
pb('\033P'), pb('='), pb('2s')
pb('\033\\', ('screen_stop_pending_mode',), ('draw', 'e'))
pb('\033P=s\033\\f\033P=s\033\\', ('screen_start_pending_mode',), ('screen_start_pending_mode',))
pb('\033P=1sxyz;.;\033\\''\033P=2skjf".,><?_+)98\033\\', ('screen_start_pending_mode',), ('screen_stop_pending_mode',))
pb('\033P=1s\033\\f\033P=1s\033\\', ('screen_start_pending_mode',), ('screen_start_pending_mode',))
def test_oth_codes(self):
s = self.create_screen()