[ruby-core:78435] [Ruby trunk Bug#12990] unicode_case_mapping_tests

From: duerst@...
Date: 2016-11-30 08:36:51 UTC
List: ruby-core #78435
Issue #12990 has been updated by Martin D端rst.


A short additional note: If cases like these increase with future versions of Unicode, I plan to change the special treatment of U+03B9/U+03BC/U+A64B to something more data-based.

----------------------------------------
Bug #12990: unicode_case_mapping_tests
https://bugs.ruby-lang.org/issues/12990#change-61808

* Author: Nobuyoshi Nakada
* Status: Closed
* 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>

In This Thread

Prev Next