aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index c4bc9e6637..f4d3dcbdad 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -1192,6 +1192,10 @@ class TestM17N < Test::Unit::TestCase
assert_equal([b].pack("C"), b.chr)
}
assert_equal("\x84\x31\xA4\x39".force_encoding("GB18030"), 0x8431A439.chr("GB18030"))
+ e = assert_raise(RangeError) {
+ 2206368128.chr(Encoding::UTF_8)
+ }
+ assert_not_match(/-\d+ out of char range/, e.message)
end
def test_marshal