Skip to content

Commit

Permalink
testsz
Browse files Browse the repository at this point in the history
  • Loading branch information
jquast committed Jun 26, 2024
1 parent d07c3d3 commit 9de76a2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,19 @@ def child():

def test_east_asian_emojis_width_1():
"""Tests edge-case of east-asian and emoji characters split into single columns."""
@as_subprocess
#@as_subprocess
def child():
term = TestTerminal()
# by @grayjk from https://github.com/jquast/blessed/issues/273
result = term.wrap(u'\u5973', 1)
assert result == [u'\u5973']

# much like test_length_with_zwj_is_wrong(), blessed gets ZWJ wrong when wrapping, also.
# In this case, each character gets its own line--even though '\u200D' is considered
# a width of 0, the next emoji is "too large to fit".
# RGI_Emoji_ZWJ_Sequence ; family: woman, woman, girl, boy
result = term.wrap(u'\U0001F469\u200D\U0001F469\u200D\U0001F467\u200D\U0001F466', 1)
assert result == [u'\U0001F469\u200D', u'\U0001F469\u200D', u'\U0001F467\u200D', u'\U0001F466']
assert result == [u'\U0001F469', u'\u200D', u'\U0001F469', u'\u200D',
u'\U0001F467', u'\u200D', u'\U0001F466']

child()

0 comments on commit 9de76a2

Please sign in to comment.