diff options
author | ima1zumi <[email protected]> | 2020-12-22 00:59:48 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2020-12-22 23:45:43 +0900 |
commit | 299f5708a2274d069c624073ca3958f8625faf35 (patch) | |
tree | b3b71c513ac60c59bcb6fc2bbf4e48b7e73660cc /test | |
parent | b52bc4a9c29e80e10b7e64dbebd97117916d3982 (diff) |
[ruby/reline] Fixed an exception occurred when ambiguous width character was passed to `#calculate_width` [Bug #17405]
https://github.com/ruby/reline/commit/f79b4c857f
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/test_unicode.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/reline/test_unicode.rb b/test/reline/test_unicode.rb index fa7aad39c4..8b28cf1cee 100644 --- a/test/reline/test_unicode.rb +++ b/test/reline/test_unicode.rb @@ -9,4 +9,8 @@ class Reline::Unicode::Test < Reline::TestCase def test_get_mbchar_width assert_equal Reline.ambiguous_width, Reline::Unicode.get_mbchar_width('é') end + + def test_ambiguous_width + assert_equal 2, Reline::Unicode.calculate_width('√', true) + end end |