aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/enc/test_case_mapping.rb
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-22 12:08:30 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-22 12:08:30 +0000
commit2f455ceca40dcddb0f92c2918796673187cd8ed4 (patch)
tree6e31d87870fbcc51b37b3fab3d9d20aed504ea74 /test/ruby/enc/test_case_mapping.rb
parentbf99f859419437c9f5826ada08cd7cdca03c7d7f (diff)
downloadruby-2f455ceca40dcddb0f92c2918796673187cd8ed4.tar.gz
* include/ruby/oniguruma.h: Additional flag for characters that are titlecase.
* enc/unicode/case-folding.rb, casefold.h: Using above flag in data. * enc/unicode.c: Marking capitalized character as unmodified if it is already titlecase. * test/ruby/enc/test_case_mapping.rb: Tests for above functionality. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/enc/test_case_mapping.rb')
-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 56d43b97c1..0f77ad3f1d 100644
--- a/test/ruby/enc/test_case_mapping.rb
+++ b/test/ruby/enc/test_case_mapping.rb
@@ -78,6 +78,12 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase
assert_equal 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79".downcase(:fold)
end
+ def test_titlecase
+ check_downcase_properties 'dz dž lj nj', 'Dz Dž Lj Nj', :lithuanian
+ check_upcase_properties 'DZ DŽ LJ NJ', 'Dz Dž Lj Nj', :lithuanian
+ check_capitalize_properties 'Dz', 'DZ', :lithuanian
+ end
+
def test_ascii_option
check_downcase_properties 'yukihiro matsumoto (matz)', 'Yukihiro MATSUMOTO (MATZ)', :ascii
check_upcase_properties 'YUKIHIRO MATSUMOTO (MATZ)', 'yukihiro matsumoto (matz)', :ascii