mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add two tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ff36c25f47
commit
b3f38b57e7
1 changed files with 3 additions and 0 deletions
|
@ -1006,6 +1006,9 @@ class TestTranscode < Test::Unit::TestCase
|
|||
fffd5 = "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD".encode 'UTF-16BE'
|
||||
fffd6 = "\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD".encode 'UTF-16BE'
|
||||
|
||||
assert_equal fffd1, "\x80".encode("utf-16be", "utf-8", invalid: :replace)
|
||||
assert_equal fffd1, "\xBF".encode("utf-16be", "utf-8", invalid: :replace)
|
||||
|
||||
assert_equal fffd2, "\xC0\x80".encode("utf-16be", "utf-8", invalid: :replace)
|
||||
assert_equal fffd2, "\xC0\xBF".encode("utf-16be", "utf-8", invalid: :replace)
|
||||
assert_equal fffd2, "\xC1\x80".encode("utf-16be", "utf-8", invalid: :replace)
|
||||
|
|
Loading…
Add table
Reference in a new issue