test/unit/util/test_string.rb in sup-0.22.1 vs test/unit/util/test_string.rb in sup-0.23
- old
+ new
@@ -9,10 +9,12 @@
let :data do
[
['some words', 10,],
['δΈζ', 4,],
['Γ€', 1,],
+ ['π±', 2],
+ #['π³οΈβπ', 2], # Emoji ZWJ sequence not yet supported (see PR #563)
]
end
it "calculates display length of a string" do
data.each do |(str, length)|
@@ -25,10 +27,12 @@
let :data do
[
['some words', 6, 'some w'],
['δΈζ', 2, 'δΈ'],
['Γ€lpha', 3, 'Γ€lp'],
+ ['π±π±', 2, 'π±'],
+ #['π³οΈβπ', 2, 'π³οΈβπ'], # Emoji ZWJ sequence not yet supported (see PR #563)
]
end
it "slices string by display length" do
data.each do |(str, length, sliced)|
@@ -43,9 +47,11 @@
['some words', 6, ['some', 'words']],
['some words', 80, ['some words']],
['δΈζ', 2, ['δΈ', 'ζ']],
['δΈζ', 5, ['δΈζ']],
['Γ€lpha', 3, ['Γ€lp', 'ha']],
+ ['π±π±', 2, ['π±', 'π±']],
+ #['π³οΈβππ³οΈβπ', 2, ['π³οΈβπ', 'π³οΈβπ']], # Emoji ZWJ sequence not yet supported (see PR #563)
]
end
it "wraps string by display length" do
data.each do |(str, length, wrapped)|