mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
f478e73f04
commit
7a360de149
1 changed files with 4 additions and 0 deletions
|
@ -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') }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue