From 83304b75c17b5126c8e8448f2cc08350146157d0 Mon Sep 17 00:00:00 2001 From: duerst Date: Mon, 14 Dec 2015 13:11:31 +0000 Subject: * enc/ebcdic.h: new dummy encoding EBCDIC-US * enc/trans/ebcdic.trans: transcodings between EBCDIC-US and iso-8859-1 [with code from Andrea Ribuoli] * test/ruby/test_transcode.rb: tests for above * tool/transcode_tablegen.rb: additional argument for method transcode_tblgen git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_transcode.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby/test_transcode.rb') diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index 4bade11a51..5162c7d5d9 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -2018,6 +2018,13 @@ class TestTranscode < Test::Unit::TestCase def test_Big5_UAO check_both_ways("\u4e17", "\x81\x40", 'Big5-UAO') # 丗 end + + def test_EBCDIC + check_both_ways("abcdeABCDE", "\x81\x82\x83\x84\x85\xC1\xC2\xC3\xC4\xC5", 'EBCDIC-US') + check_both_ways("aijrszAIJRSZ09", "\x81\x89\x91\x99\xA2\xA9\xC1\xC9\xD1\xD9\xE2\xE9\xF0\xF9", 'EBCDIC-US') + check_both_ways("Matz", "\xD4\x81\xA3\xA9", 'EBCDIC-US') # Dürst + check_both_ways("D\u00FCrst", "\xC4\xDC\x99\xA2\xA3", 'EBCDIC-US') # Dürst + end def test_nothing_changed a = "James".force_encoding("US-ASCII") -- cgit v1.2.3