diff options
-rw-r--r-- | test/ruby/test_m17n.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 2552fd2272..ef2ebd8d59 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -151,6 +151,10 @@ class TestM17N < Test::Unit::TestCase assert_encoding("EUC-JP", eval(e(%{"\\x80"})).encoding) end + def test_utf8_literal + assert_equal(Encoding::UTF_8, "\u3042".encoding, "[ruby-dev:33406] \"\\u3042\".encoding") + end + def test_string_mixed_unicode assert_raise(SyntaxError) { eval(a(%{"\xc2\xa1\\u{6666}"})) } assert_raise(SyntaxError) { eval(e(%{"\xc2\xa1\\u{6666}"})) } |