mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-09 05:35:19 +02:00
Fix #8794
This commit is contained in:
@@ -710,12 +710,24 @@ class TestScreen(BaseTest):
|
||||
self.ae(s.text_for_selection(), ('a\u00adb',))
|
||||
|
||||
def test_variation_selectors(self):
|
||||
s = self.create_screen(cols=8)
|
||||
def widths(text, *widths):
|
||||
s.reset()
|
||||
s.draw(text)
|
||||
def w(x):
|
||||
c = s.cpu_cells(0, x)
|
||||
return (c['mcd'] or {'width': 1})['width']
|
||||
actual = tuple(w(x) for x in range(len(widths)))
|
||||
self.ae(widths, actual)
|
||||
widths('\u4e00\u4e00\u26ab\ufe0e', 2, 2, 2, 2, 1)
|
||||
|
||||
s = self.create_screen()
|
||||
def tt(text_to_draw):
|
||||
s.reset()
|
||||
s.draw(text_to_draw)
|
||||
self.ae(str(s.line(0)), text_to_draw)
|
||||
tt('abc\U0001f44d\ufe0ed')
|
||||
|
||||
def t(*a):
|
||||
s.reset()
|
||||
for i in range(0, len(a), 2):
|
||||
|
||||
Reference in New Issue
Block a user