diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-22 12:08:30 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-22 12:08:30 +0000 |
commit | 9c84c5e5507aaf739029552e61d602a3ea0ee265 (patch) | |
tree | 6e31d87870fbcc51b37b3fab3d9d20aed504ea74 /test/ruby/enc/test_case_mapping.rb | |
parent | 116aff7f2e98780382d0b660b5e058bc591d3051 (diff) | |
download | ruby-9c84c5e5507aaf739029552e61d602a3ea0ee265.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.rb | 6 |
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 |