ruby-changes:47406
From: duerst <ko1@a...>
Date: Sun, 6 Aug 2017 14:22:38 +0900 (JST)
Subject: [ruby-changes:47406] duerst:r59521 (trunk): add some more assertions to test_ill_formed_utf_8_replace
duerst 2017-08-06 14:22:26 +0900 (Sun, 06 Aug 2017) New Revision: 59521 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59521 Log: add some more assertions to test_ill_formed_utf_8_replace Modified files: trunk/test/ruby/test_transcode.rb Index: test/ruby/test_transcode.rb =================================================================== --- test/ruby/test_transcode.rb (revision 59520) +++ test/ruby/test_transcode.rb (revision 59521) @@ -1008,6 +1008,15 @@ class TestTranscode < Test::Unit::TestCa https://github.com/ruby/ruby/blob/trunk/test/ruby/test_transcode.rb#L1008 assert_equal fffd1, "\x80".encode("utf-16be", "utf-8", invalid: :replace) assert_equal fffd1, "\xBF".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xC3".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xDF".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xE0".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xE0\xA0".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xE0\xBF".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xE1".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xEC".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xE1\x80".encode("utf-16be", "utf-8", invalid: :replace) + assert_equal fffd1, "\xEC\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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/