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:
parent
be5159c2f8
commit
168bd4f356
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue