1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test for [ruby-dev:33406].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-01-26 11:15:24 +00:00
parent 26b86d8a72
commit 8c02164fb5

View file

@ -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}"})) }