diff options
author | Won-Kyu Park <wkpark@gmail.com> | 2023-03-14 02:52:54 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2023-04-15 11:38:43 +0900 |
commit | 154a5e0f13aebc80a465336642a406d6ddfc06cf (patch) | |
tree | d31cfb3e99ea40b087c7519b4aa27503a15c7d2c /bindings/ruby/test-hangul.rb | |
parent | ad760a7d3b16384031f60aa5a31e8e153b2273e3 (diff) | |
download | libhangul-154a5e0f13aebc80a465336642a406d6ddfc06cf.tar.gz |
Diffstat (limited to 'bindings/ruby/test-hangul.rb')
-rw-r--r-- | bindings/ruby/test-hangul.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bindings/ruby/test-hangul.rb b/bindings/ruby/test-hangul.rb index f38abe1..dea3a6d 100644 --- a/bindings/ruby/test-hangul.rb +++ b/bindings/ruby/test-hangul.rb @@ -3,20 +3,20 @@ require 'hangul' class TestHangulInputContext < Test::Unit::TestCase def setup - @hic = Hangul::InputContext.new(Hangul::KEYBOARD_2) + @hic = Hangul::InputContext.new("2") end def test_2bul_string - input = "fnql gksrmf fkdlqmfjfl xptmxm" - expected = "루비 한글 라이브러리 테스트" + input = "fnql gksrmf fkdlqmfjfl xptmxm." + expected = "루비 한글 라이브러리 테스트." buffer = '' input.each_byte do |c| - ret = @hic.filter(c) + ret = @hic.process(c) buffer << @hic.commit_string.to_s buffer << c.chr unless ret end @hic.flush buffer << @hic.commit_string.to_s - assert_equal expected, buffer + assert_equal expected, buffer.to_s.force_encoding("UTF-8") end end |