1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Add a test for Reline::Unicode#take_range

https://github.com/ruby/reline/commit/af7953ff93
This commit is contained in:
aycabta 2021-09-06 06:50:34 +09:00 committed by git
parent be5159c2f8
commit 168bd4f356

View file

@ -17,4 +17,9 @@ class Reline::Unicode::Test < Reline::TestCase
def test_ambiguous_width
assert_equal 2, Reline::Unicode.calculate_width('√', true)
end
def test_take_range
assert_equal 'cdef', Reline::Unicode.take_range('abcdefghi', 2, 4)
assert_equal 'いう', Reline::Unicode.take_range('あいうえお', 2, 4)
end
end