mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix erroneous test of target against target
* test/ruby/enc/test_case_comprehensive.rb: fix test condition, add a temporary check for U+A64B, the only character where the tests currently fail. (Bug #12990) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6f58ef198
commit
ddfa6e2b53
1 changed files with 3 additions and 1 deletions
|
@ -146,10 +146,12 @@ TestComprehensiveCaseFold.data_files_available? and class TestComprehensiveCase
|
|||
attributes.prepend '_' unless attributes.empty?
|
||||
define_method "test_#{encoding}_#{test.method_name}#{attributes}" do
|
||||
@@codepoints.each do |code|
|
||||
next if code=="\uA64B" # temporarily exclude this character from testing,
|
||||
# see https://bugs.ruby-lang.org/issues/12990
|
||||
source = code.encode(encoding) * 5
|
||||
target = "#{test.first_data[code]}#{test.follow_data[code]*4}".encode(encoding)
|
||||
result = source.__send__(test.method_name, *test.attributes)
|
||||
assert_equal target, target,
|
||||
assert_equal target, result,
|
||||
proc{"from #{code*5} (#{source.dump}) expected #{target.dump} but was #{result.dump}"}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue