mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
49f25a1299
commit
78f540019a
5 changed files with 85 additions and 48 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue