mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-19 02:27:10 +03:00
Some simple tests for sc81t
This commit is contained in:
parent
c17c6cae4c
commit
b191727567
@ -283,8 +283,9 @@ handle_esc_mode_char(Screen *screen, uint32_t ch, PyObject DUMP_UNUSED *dump_cal
|
||||
REPORT_COMMAND(screen_set_8bit_controls, ch == 'G');
|
||||
screen_set_8bit_controls(screen, ch == 'G');
|
||||
break;
|
||||
}
|
||||
default:
|
||||
REPORT_ERROR("Unhandled ESC SP escape code: 0x%x", ch); break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
REPORT_ERROR("Unhandled charset related escape code: 0x%x 0x%x", screen->parser_buf[0], ch); break;
|
||||
|
@ -215,6 +215,17 @@ def test_dcs_codes(self):
|
||||
pb('\033P$qr\033\\', ('screen_request_capabilities', ord('$'), 'r'))
|
||||
self.ae(c.wtcbuf, '\033P1$r{};{}r\033\\'.format(s.margin_top + 1, s.margin_bottom + 1).encode('ascii'))
|
||||
|
||||
def test_sc81t(self):
|
||||
s = self.create_screen()
|
||||
pb = partial(self.parse_bytes_dump, s)
|
||||
pb('\033 G', ('screen_set_8bit_controls', 1))
|
||||
c = s.callbacks
|
||||
pb('\033P$qm\033\\', ('screen_request_capabilities', ord('$'), 'm'))
|
||||
self.ae(c.wtcbuf, b'\x901$r0m\x9c')
|
||||
c.clear()
|
||||
pb('\033[0c', ('report_device_attributes', 0, 0))
|
||||
self.ae(c.wtcbuf, b'\x9b?62;c')
|
||||
|
||||
def test_oth_codes(self):
|
||||
s = self.create_screen()
|
||||
pb = partial(self.parse_bytes_dump, s)
|
||||
|
Loading…
Reference in New Issue
Block a user