[ruby-core:78433] [Ruby trunk Bug#12990] unicode_case_mapping_tests
From:
duerst@...
Date:
2016-11-30 05:56:14 UTC
List:
ruby-core #78433
Issue #12990 has been updated by Martin D端rst.
Just for the record, I think this is where the problem was introduced:
https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/55478/diff/test/ruby/enc/test_case_comprehensive.rb
That explains why almost all characters are okay (only changes from Unicode 8.0.0 to Unicode 9.0.0 happened after this test bug).
----------------------------------------
Bug #12990: unicode_case_mapping_tests
https://bugs.ruby-lang.org/issues/12990#change-61805
* Author: Nobuyoshi Nakada
* Status: Open
* Priority: Normal
* Assignee: Martin D端rst
* ruby -v: 56907
* Backport: 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONTNEED
----------------------------------------
I found that tests generated by `TestComprehensiveCaseFold.unicode_case_mapping_tests` compares `target` with same `target`, which should be always true usually.
I suspect this is unintentional, tried comparison `target` with `result`,
```diff
diff --git a/test/ruby/enc/test_case_comprehensive.rb b/test/ruby/enc/test_case_comprehensive.rb
index 13639f3..cfff9b8 100644
--- a/test/ruby/enc/test_case_comprehensive.rb
+++ b/test/ruby/enc/test_case_comprehensive.rb
@@ -149,7 +149,7 @@
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
```
and got 30 failures.
Is this intentional?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>