diff options
Diffstat (limited to 'test/ruby/test_transcode.rb')
-rw-r--r-- | test/ruby/test_transcode.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index d16a4d534b..6349d3b29b 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -1373,6 +1373,15 @@ class TestTranscode < Test::Unit::TestCase assert_equal("\u5fde", "\e$B\x7A\x21".encode("utf-8", "cp50221")) assert_equal("\u72be", "\e$B\x7B\x21".encode("utf-8", "cp50221")) assert_equal("\u91d7", "\e$B\x7C\x21".encode("utf-8", "cp50221")) + assert_equal("\e(I!_\e(B", "\xA1\xDF".encode("cp50220","sjis")) + end + + def test_cp50221 + assert_equal("\e$B!#!,\e(B".force_encoding("cp50220"), + "\xA1\xDF".encode("cp50220","sjis")) + assert_equal("\e$B%*!+%,%I%J!+%N!+%P%\\%^!+%Q%]%\"\e(B".force_encoding("cp50220"), + "\xB5\xDE\xB6\xDE\xC4\xDE\xC5\xDE\xC9\xDE\xCA\xDE\xCE\xDE\xCF\xDE\xCA\xDF\xCE\xDF\xB1". + encode("cp50220", "sjis")) end def test_iso_2022_jp_1 |