mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-11 18:32:12 +02:00
Restore support for alternate character sets
Needed by the execrable ncurses. Adds an extra branch in the hot path, sigh. Thanks to branch prediction it doesnt have any measurable impact on the benchmark, thankfully.
This commit is contained in:
@@ -76,6 +76,20 @@ class TestParser(BaseTest):
|
||||
parse_bytes(s, x, cd)
|
||||
self.ae(cmds, cd.get_result())
|
||||
|
||||
def test_charsets(self):
|
||||
s = self.create_screen()
|
||||
pb = partial(self.parse_bytes_dump, s)
|
||||
pb(b'\xc3')
|
||||
pb(b'\xa1', ('draw', b'\xc3\xa1'.decode('utf-8')))
|
||||
s = self.create_screen()
|
||||
pb = partial(self.parse_bytes_dump, s)
|
||||
pb('\033)0\x0e/_', ('screen_designate_charset', 1, ord('0')), ('screen_change_charset', 1), '/_')
|
||||
self.ae(str(s.line(0)), '/\xa0')
|
||||
s = self.create_screen()
|
||||
pb = partial(self.parse_bytes_dump, s)
|
||||
pb('\033(0/_', ('screen_designate_charset', 0, ord('0')), '/_')
|
||||
self.ae(str(s.line(0)), '/\xa0')
|
||||
|
||||
def test_parser_threading(self):
|
||||
s = self.create_screen()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user