Skip to content

Commit f54bfe0

Browse files
authored
Merge pull request #4007 from Textualize/copilot/sub-pr-4006
Add regression tests for VS16 after zero-width chars in split_graphemes
2 parents 7338cb9 + f07a3fc commit f54bfe0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_cells.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,16 @@ def test_is_single_cell_widths() -> None:
209209
[(0, 2, 0)],
210210
0,
211211
), # Two ZWJs should have zero width
212+
(
213+
"\x1b\ufe0f",
214+
[(0, 2, 0)],
215+
0,
216+
), # VS16 after escape (zero-width, doesn't set last_measured_character) should have zero width
217+
(
218+
"\u200d\ufe0f",
219+
[(0, 2, 0)],
220+
0,
221+
), # VS16 after ZWJ (zero-width, doesn't set last_measured_character) should have zero width
212222
],
213223
)
214224
def test_split_graphemes(

0 commit comments

Comments
 (0)