summaryrefslogtreecommitdiff
path: root/test/ruby/test_transcode.rb
diff options
context:
space:
mode:
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")