diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-10 10:33:51 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-10 10:33:51 +0000 |
commit | 8f0b58d36addb9466f58e692df69e568c7fdd72a (patch) | |
tree | 7dc78a951a4d65a34a71a9e111ad6d3c4eab5a28 /test/ruby/enc | |
parent | 40a34feb4cf7150539708d2de34b4ec883931be3 (diff) |
* test/ruby/enc/test_case_comprehensive.rb: Changed testing logic in to
catch unintended modifications of characters that do not have a case
equivalent in the respective encoding.
* enc/iso_8859_1.c, enc/iso_8859_15.c: Fixed unintended modifications of
micro sign and y with diaeresis.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/enc')
-rw-r--r-- | test/ruby/enc/test_case_comprehensive.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/enc/test_case_comprehensive.rb b/test/ruby/enc/test_case_comprehensive.rb index bd30166de3..d1d1c3b282 100644 --- a/test/ruby/enc/test_case_comprehensive.rb +++ b/test/ruby/enc/test_case_comprehensive.rb @@ -165,7 +165,12 @@ class TestComprehensiveCaseFold codepoints.each do |code| begin source = code.encode(encoding) * 5 - target = "#{test.first_data[code]}#{test.follow_data[code]*4}".encode(encoding) + begin + target = "#{test.first_data[code]}#{test.follow_data[code]*4}".encode(encoding) + rescue Encoding::UndefinedConversionError + raise if code =~ /i|I/ # special case for Turkic + target = source + end result = source.send(test.method_name, *test.attributes) assert_equal target, result, proc{"from #{code*5} (#{source.dump}) expected #{target.dump} but was #{result.dump}"} |