summaryrefslogtreecommitdiff
path: root/test/ruby/test_transcode.rb
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 13:11:31 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 13:11:31 +0000
commit83304b75c17b5126c8e8448f2cc08350146157d0 (patch)
treeecfc6fb7163b13c09a14af1c0b462eae79f125c9 /test/ruby/test_transcode.rb
parent059c9c1cf371e049c7481c78b76e9620da52757f (diff)
* 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
Diffstat (limited to 'test/ruby/test_transcode.rb')
-rw-r--r--test/ruby/test_transcode.rb7
1 files changed, 7 insertions, 0 deletions
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")