aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 07:53:43 +0000
committerduerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-29 07:53:43 +0000
commit78f540019a394421e1875cacaf956e8c23b18cc0 (patch)
tree9b1e1d75453aa54f7cde6ec5a31b51c4eec56460 /test
parent49f25a1299e04d3423351ab9bc212b8cdd6547a3 (diff)
downloadruby-78f540019a394421e1875cacaf956e8c23b18cc0.tar.gz
* enc/unicode/case-folding.rb, casefold.h: Tweaked handling of 6
special cases in CaseUnfold_11_Table. * enc/unicode.c: Adjustments for above. * test/ruby/enc/test_case_mapping.rb: Tests for the above: Some tests in test_titlecase activated; test_greek added. A test in test_cherokee fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/enc/test_case_mapping.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/ruby/enc/test_case_mapping.rb b/test/ruby/enc/test_case_mapping.rb
index 5d028d9186..b52d86b57a 100644
--- a/test/ruby/enc/test_case_mapping.rb
+++ b/test/ruby/enc/test_case_mapping.rb
@@ -74,7 +74,7 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase
check_downcase_properties "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79", 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', :lithuanian
check_upcase_properties 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79", :lithuanian
check_capitalize_suffixes "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79", 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ'
- assert_equal 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', :fold
+ assert_equal 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ'.downcase(:fold)
assert_equal 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79".downcase(:fold)
end
@@ -82,15 +82,15 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase
check_downcase_properties 'dz dž lj nj', 'Dz Dž Lj Nj', :lithuanian
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_upcase_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
check_capitalize_properties 'Dž', 'DŽ', :lithuanian
check_capitalize_properties 'Lj', 'LJ', :lithuanian
check_capitalize_properties 'Nj', 'NJ', :lithuanian
- # check_capitalize_properties 'Dz', 'dz', :lithuanian
- # check_capitalize_properties 'Dž', 'dž', :lithuanian
- # check_capitalize_properties 'Lj', 'lj', :lithuanian
- # check_capitalize_properties 'Nj', 'nj', :lithuanian
+ check_capitalize_properties 'Dz', 'dz', :lithuanian
+ check_capitalize_properties 'Dž', 'dž', :lithuanian
+ check_capitalize_properties 'Lj', 'lj', :lithuanian
+ check_capitalize_properties 'Nj', 'nj', :lithuanian
end
def test_ascii_option
@@ -116,6 +116,11 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase
check_downcase_properties "yuki\u0307hi\u0307ro matsumoto (matz)", 'YUKİHİRO MATSUMOTO (MATZ)', :lithuanian
end
+ def test_greek
+ check_downcase_properties 'αβγδεζηθικλμνξοπρστυφχψω', 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ', :lithuanian
+ check_upcase_properties 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ', 'αβγδεζηθικλμνξοπρστυφχψω', :lithuanian
+ end
+
def no_longer_a_test_buffer_allocations
assert_equal 'TURKISH*ı'*10, ('I'*10).downcase(:turkic, :lithuanian)
assert_equal 'TURKISH*ı'*100, ('I'*100).downcase(:turkic, :lithuanian)