From 3edae0d2c773a80b3d1a14ed810492f45c80a473 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 8 Sep 2008 15:03:10 +0000 Subject: add tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_transcode.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby/test_transcode.rb') diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index f0111243c..d7a4aca99 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -546,6 +546,7 @@ class TestTranscode < Test::Unit::TestCase check_both_ways("\u005C", "\x5C", "eucJP-ms") check_both_ways("\u005C", "\x5C", "CP51932") check_both_ways("\u005C", "\x5C", "ISO-2022-JP") + assert_equal("\u005C", "\e(B\x5C\e(B".encode("UTF-8", "ISO-2022-JP")) assert_equal("\u005C", "\e(J\x5C\e(B".encode("UTF-8", "ISO-2022-JP")) assert_raise(Encoding::ConversionUndefined) { "\u00A5".encode("Shift_JIS") } assert_raise(Encoding::ConversionUndefined) { "\u00A5".encode("Windows-31J") } @@ -568,6 +569,7 @@ class TestTranscode < Test::Unit::TestCase check_both_ways("\u007E", "\x7E", "eucJP-ms") check_both_ways("\u007E", "\x7E", "CP51932") check_both_ways("\u007E", "\x7E", "ISO-2022-JP") + assert_equal("\u007E", "\e(B\x7E\e(B".encode("UTF-8", "ISO-2022-JP")) assert_equal("\u007E", "\e(J\x7E\e(B".encode("UTF-8", "ISO-2022-JP")) assert_raise(Encoding::ConversionUndefined) { "\u203E".encode("Shift_JIS") } assert_raise(Encoding::ConversionUndefined) { "\u203E".encode("Windows-31J") } -- cgit