Add a test for unicode regional indicator widths
This commit is contained in:
parent
000c1cf306
commit
5fa5bf8142
@ -338,6 +338,9 @@ class TestDataTypes(BaseTest):
|
||||
self.ae(tuple(map(w, 'a1\0コニチ ✔')), (1, 1, 0, 2, 2, 2, 1, 1))
|
||||
self.ae(wcswidth('\u2716\u2716\ufe0f\U0001f337'), 5)
|
||||
self.ae(wcswidth('\033a\033[2mb'), 2)
|
||||
# Regional indicator symbols (unicode flags) are defined as having
|
||||
# Emoji_Presentation so must have width 2
|
||||
self.ae(tuple(map(w, '\U0001f1ee\U0001f1f3')), (2, 2))
|
||||
tpl = truncate_point_for_length
|
||||
self.ae(tpl('abc', 4), 3)
|
||||
self.ae(tpl('abc', 2), 2)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user