From 94342f89f9b0139210f9b1ceb0952073090d850a Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 8 Aug 2008 16:12:03 +0000 Subject: [PATCH] add several tests for UTF-32LE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_transcode.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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!",