add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-01-10 14:26:08 +00:00
parent f478e73f04
commit 7a360de149

View File

@ -248,6 +248,10 @@ class TestM17N < Test::Unit::TestCase
}
end
def test_utf16_valid_encoding
assert_equal(false, "\xd8\x00\xd8\x00".force_encoding("utf-16be").valid_encoding?)
end
def test_regexp_too_short_multibyte_character
assert_raise(SyntaxError) { eval('/\xfe/e') }
assert_raise(SyntaxError) { eval('/\x8e/e') }