From 81515b2381dcd325ca57c0272a551bba4f112afd Mon Sep 17 00:00:00 2001 From: duerst Date: Sat, 6 Feb 2016 05:37:29 +0000 Subject: * enc/unicode.c, test/ruby/enc/test_case_mapping.rb: Implemented :fold option for String#downcase by using case folding data from regular expression engine, and added a few simple tests. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/enc/test_case_mapping.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby/enc/test_case_mapping.rb') diff --git a/test/ruby/enc/test_case_mapping.rb b/test/ruby/enc/test_case_mapping.rb index 3ac647717d..2c712e448d 100644 --- a/test/ruby/enc/test_case_mapping.rb +++ b/test/ruby/enc/test_case_mapping.rb @@ -59,6 +59,12 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase check_swapcase_properties 'rÉsumÉ dÜrst ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤĬŌŅ', 'RÉSUMÉ DÜRST ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤĬŌŅ', :ascii end + def test_fold_option + check_downcase_properties 'ss', 'ß', :fold + check_downcase_properties 'fifl', 'fifl', :fold + check_downcase_properties 'σ', 'ς', :fold + end + def test_turcic check_downcase_properties 'yukihiro matsumoto (matz)', 'Yukihiro MATSUMOTO (MATZ)', :turkic check_upcase_properties 'YUKİHİRO MATSUMOTO (MATZ)', 'Yukihiro Matsumoto (matz)', :turkic -- cgit v1.2.3