diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-28 02:28:00 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-28 02:28:00 +0000 |
commit | b3f38b57e72a9904e6c337196d5077638929e9c2 (patch) | |
tree | 071a8cc795a46e7e703d3881738bffccd2167348 /test | |
parent | ff36c25f475d63135d7088a4c25cde3d34045daa (diff) | |
download | ruby-b3f38b57e72a9904e6c337196d5077638929e9c2.tar.gz |
add two tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_transcode.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index 1561468b54..d158d39906 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -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) |