When dumping commands dump stop_pending_mode at the correct place

This commit is contained in:
Kovid Goyal
2021-07-03 12:07:46 +05:30
parent 38ae370202
commit 1ef895e246
3 changed files with 19 additions and 12 deletions

View File

@@ -347,7 +347,7 @@ class TestParser(BaseTest):
pb('\033P=1s\033\\', ('screen_start_pending_mode',))
pb('a')
self.ae(str(s.line(0)), '')
pb('\033P=2s\033\\', ('screen_stop_pending_mode',), ('draw', 'a'))
pb('\033P=2s\033\\', ('draw', 'a'), ('screen_stop_pending_mode',))
self.ae(str(s.line(0)), 'a')
pb('\033P=1s\033\\', ('screen_start_pending_mode',))
pb('b')
@@ -356,20 +356,20 @@ class TestParser(BaseTest):
pb('c', ('draw', 'bc'))
self.ae(str(s.line(0)), 'abc')
pb('\033P=1s\033\\d', ('screen_start_pending_mode',))
pb('\033P=2s\033\\', ('screen_stop_pending_mode',), ('draw', 'd'))
pb('\033P=2s\033\\', ('draw', 'd'), ('screen_stop_pending_mode',))
pb('\033P=1s\033\\e', ('screen_start_pending_mode',))
pb('\033P'), pb('='), pb('2s')
pb('\033\\', ('screen_stop_pending_mode',), ('draw', 'e'))
pb('\033P=1sxyz;.;\033\\''\033P=2skjf".,><?_+)98\033\\', ('screen_start_pending_mode',), ('screen_stop_pending_mode',))
pb('\033\\', ('draw', 'e'), ('screen_stop_pending_mode',))
pb('\033P=1sxyz;.;\033\\''\033P=2skjf".,><?_+)98\033\\', ('screen_start_pending_mode',))
pb('\033P=1s\033\\f\033P=1s\033\\', ('screen_start_pending_mode',), ('screen_start_pending_mode',))
pb('\033P=2s\033\\', ('screen_stop_pending_mode',), ('draw', 'f'))
pb('\033P=1s\033\\XXX\033P=2s\033\\', ('screen_start_pending_mode',), ('screen_stop_pending_mode',), ('draw', 'XXX'))
pb('\033P=2s\033\\', ('draw', 'f'), ('screen_stop_pending_mode',))
pb('\033P=1s\033\\XXX\033P=2s\033\\', ('screen_start_pending_mode',), ('draw', 'XXX'), ('screen_stop_pending_mode',))
pb('\033[?2026hXXX\033[?2026l', ('screen_set_mode', 2026, 1), ('screen_reset_mode', 2026, 1), ('draw', 'XXX'))
pb('\033[?2026h\033[32ma\033[?2026l', ('screen_set_mode', 2026, 1), ('screen_reset_mode', 2026, 1), ('select_graphic_rendition', '32 '), ('draw', 'a'))
pb('\033[?2026hXXX\033[?2026l', ('screen_set_mode', 2026, 1), ('draw', 'XXX'), ('screen_reset_mode', 2026, 1))
pb('\033[?2026h\033[32ma\033[?2026l', ('screen_set_mode', 2026, 1), ('select_graphic_rendition', '32 '), ('draw', 'a'), ('screen_reset_mode', 2026, 1))
pb('\033[?2026h\033P+q544e\033\\ama\033P=2s\033\\',
('screen_set_mode', 2026, 1), ('screen_stop_pending_mode',), ('screen_request_capabilities', 43, '544e'), ('draw', 'ama'))
pb('\033P=1s\033\\\033(B\033P=2s\033\\', ('screen_start_pending_mode',), ('screen_stop_pending_mode',), ('screen_designate_charset', 0, 66))
('screen_set_mode', 2026, 1), ('screen_request_capabilities', 43, '544e'), ('draw', 'ama'), ('screen_stop_pending_mode',))
pb('\033P=1s\033\\\033(B\033P=2s\033\\', ('screen_start_pending_mode',), ('screen_designate_charset', 0, 66), ('screen_stop_pending_mode',))
s.reset()
s.set_pending_timeout(timeout)