summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-06 05:37:29 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-06 05:37:29 +0000
commit81515b2381dcd325ca57c0272a551bba4f112afd (patch)
treebb427b2ff4bee977ae543f12cf6ed0436fc0007a /test/ruby
parent6ab70ad72aed0909868f59135f6f5d1e49877323 (diff)
* 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
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/enc/test_case_mapping.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/enc/test_case_mapping.rb b/test/ruby/enc/test_case_mapping.rb
index 3ac6477..2c712e4 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