diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index 095028e42a..ec4fb0d705 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -285,6 +285,13 @@ class TestTranscode < Test::Unit::TestCase assert_equal("\uFFFD!", "\x00\x00\xd8\x00\x00\x00\x00!".encode("utf-8", "utf-32be", :invalid=>:replace)) + assert_equal("\uFFFD!", + "\x00\x00\x00\xff!\x00\x00\x00".encode("utf-8", "utf-32le", :invalid=>:replace)) + assert_equal("\uFFFD!", + "\x00\x00\xff\x00!\x00\x00\x00".encode("utf-8", "utf-32le", :invalid=>:replace)) + assert_equal("\uFFFD!", + "\x00\xd8\x00\x00!\x00\x00\x00".encode("utf-8", "utf-32le", :invalid=>:replace)) + assert_equal("\uFFFD!", "\xff!".encode("utf-8", "euc-jp", :invalid=>:replace)) assert_equal("\uFFFD!",