From 21f26018d253bf1320432a956a9ce7dfa8ab7adb Mon Sep 17 00:00:00 2001 From: manga_osyo Date: Thu, 12 Nov 2020 13:42:29 +0900 Subject: [PATCH] [ruby/reline] Add test `Reline::Unicode.test_get_mbchar_width`. https://github.com/ruby/reline/commit/301e9048fc --- test/reline/test_unicode.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/reline/test_unicode.rb diff --git a/test/reline/test_unicode.rb b/test/reline/test_unicode.rb new file mode 100644 index 0000000000..fa7aad39c4 --- /dev/null +++ b/test/reline/test_unicode.rb @@ -0,0 +1,12 @@ +require_relative 'helper' +require "reline/unicode" + +class Reline::Unicode::Test < Reline::TestCase + def setup + Reline.send(:test_mode) + end + + def test_get_mbchar_width + assert_equal Reline.ambiguous_width, Reline::Unicode.get_mbchar_width('é') + end +end