Skip to content

Commit af7953f

Browse files
committed
Add a test for Reline::Unicode#take_range
1 parent c30632f commit af7953f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/reline/test_unicode.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,9 @@ def test_get_mbchar_width
1717
def test_ambiguous_width
1818
assert_equal 2, Reline::Unicode.calculate_width('√', true)
1919
end
20+
21+
def test_take_range
22+
assert_equal 'cdef', Reline::Unicode.take_range('abcdefghi', 2, 4)
23+
assert_equal 'いう', Reline::Unicode.take_range('あいうえお', 2, 4)
24+
end
2025
end

0 commit comments

Comments
 (0)