diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-04 06:40:39 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-04 06:40:39 +0000 |
commit | 0e92ae9636db5b566e8e3bbcb39c3613facfd898 (patch) | |
tree | 2b357361b3997fe32a20178a298460e030e1d7c8 /test/ruby | |
parent | 2f522b9cc6f3e184404040b12af4486520a73b26 (diff) | |
download | ruby-0e92ae9636db5b566e8e3bbcb39c3613facfd898.tar.gz |
* enc/trans/utf8_mac-tbl.rb: fix r42789.
Fix conversion table and logic. [ruby-dev:47680]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_transcode.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index dffd2a087b..530e8f4669 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -52,7 +52,7 @@ class TestTranscode < Test::Unit::TestCase end def check_both_ways(utf8, raw, encoding) - assert_equal(utf8.force_encoding('utf-8'), raw.encode('utf-8', encoding),utf8.dump) + assert_equal(utf8.force_encoding('utf-8'), raw.encode('utf-8', encoding),utf8.dump+raw.dump) assert_equal(raw.force_encoding(encoding), utf8.encode(encoding, 'utf-8')) end @@ -2027,11 +2027,13 @@ class TestTranscode < Test::Unit::TestCase end def test_utf8_mac - assert_equal("\u{fb4d}", "\u05DB\u05BF".encode("UTF-8", "UTF8-MAC")) - assert_equal("\u{1ff7}", "\u03C9\u0345\u0342".encode("UTF-8", "UTF8-MAC")) + # composition exclusion + assert_equal("\u05DB\u05BF", "\u05DB\u05BF".encode("UTF-8", "UTF8-MAC")) #"\u{fb4d}" + + assert_equal("\u{1ff7}", "\u03C9\u0342\u0345".encode("UTF-8", "UTF8-MAC")) assert_equal("\u05DB\u05BF", "\u{fb4d}".encode("UTF8-MAC").force_encoding("UTF-8")) - assert_equal("\u03C9\u0345\u0342", "\u{1ff7}".encode("UTF8-MAC").force_encoding("UTF-8")) + assert_equal("\u03C9\u0342\u0345", "\u{1ff7}".encode("UTF8-MAC").force_encoding("UTF-8")) check_both_ways("\u{e9 74 e8}", "e\u0301te\u0300", 'UTF8-MAC') end |