2016-01-15 20:24:03 -05:00
|
|
|
|
# Copyright © 2016 Kimihito Matsui (松井 仁人) and Martin J. Dürst (duerst@it.aoyama.ac.jp)
|
|
|
|
|
|
|
|
|
|
require "test/unit"
|
|
|
|
|
|
2016-06-06 00:16:49 -04:00
|
|
|
|
# preliminary tests, using as a guard
|
2016-01-15 20:24:03 -05:00
|
|
|
|
# to test new implementation strategy
|
|
|
|
|
class TestCaseMappingPreliminary < Test::Unit::TestCase
|
2016-01-17 06:10:45 -05:00
|
|
|
|
# checks, including idempotence and non-modification; not always guaranteed
|
|
|
|
|
def check_upcase_properties(expected, start, *flags)
|
|
|
|
|
assert_equal expected, start.upcase(*flags)
|
2016-03-16 02:44:05 -04:00
|
|
|
|
temp = start.dup
|
2016-05-24 19:01:39 -04:00
|
|
|
|
assert_equal expected, temp.upcase!(*flags) unless expected==temp
|
|
|
|
|
assert_equal nil, temp.upcase!(*flags) if expected==temp
|
2016-01-17 06:10:45 -05:00
|
|
|
|
assert_equal expected, expected.upcase(*flags)
|
2016-03-16 02:44:05 -04:00
|
|
|
|
temp = expected.dup
|
2016-01-17 06:10:45 -05:00
|
|
|
|
assert_nil temp.upcase!(*flags)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def check_downcase_properties(expected, start, *flags)
|
|
|
|
|
assert_equal expected, start.downcase(*flags)
|
2016-03-16 02:44:05 -04:00
|
|
|
|
temp = start.dup
|
2016-05-24 19:01:39 -04:00
|
|
|
|
assert_equal expected, temp.downcase!(*flags) unless expected==temp
|
|
|
|
|
assert_equal nil, temp.downcase!(*flags) if expected==temp
|
2016-01-17 06:10:45 -05:00
|
|
|
|
assert_equal expected, expected.downcase(*flags)
|
2016-03-16 02:44:05 -04:00
|
|
|
|
temp = expected.dup
|
2016-01-17 06:10:45 -05:00
|
|
|
|
assert_nil temp.downcase!(*flags)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def check_capitalize_properties(expected, start, *flags)
|
|
|
|
|
assert_equal expected, start.capitalize(*flags)
|
2016-03-16 02:44:05 -04:00
|
|
|
|
temp = start.dup
|
2016-05-24 19:01:39 -04:00
|
|
|
|
assert_equal expected, temp.capitalize!(*flags) unless expected==temp
|
|
|
|
|
assert_equal nil, temp.capitalize!(*flags) if expected==temp
|
2016-01-17 06:10:45 -05:00
|
|
|
|
assert_equal expected, expected.capitalize(*flags)
|
2016-03-16 02:44:05 -04:00
|
|
|
|
temp = expected.dup
|
2016-01-17 06:10:45 -05:00
|
|
|
|
assert_nil temp.capitalize!(*flags)
|
|
|
|
|
end
|
|
|
|
|
|
2016-03-16 02:44:05 -04:00
|
|
|
|
def check_capitalize_suffixes(lower, upper)
|
2016-03-16 04:58:56 -04:00
|
|
|
|
while upper.length > 1
|
2016-03-16 02:44:05 -04:00
|
|
|
|
lower = lower[1..-1]
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_capitalize_properties upper[0]+lower, upper
|
2016-03-16 02:44:05 -04:00
|
|
|
|
upper = upper[1..-1]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2016-01-17 06:10:45 -05:00
|
|
|
|
# different properties; careful: roundtrip isn't always guaranteed
|
|
|
|
|
def check_swapcase_properties(expected, start, *flags)
|
|
|
|
|
assert_equal expected, start.swapcase(*flags)
|
|
|
|
|
temp = start
|
|
|
|
|
assert_equal expected, temp.swapcase!(*flags)
|
|
|
|
|
assert_equal start, start.swapcase(*flags).swapcase(*flags)
|
|
|
|
|
assert_equal expected, expected.swapcase(*flags).swapcase(*flags)
|
|
|
|
|
end
|
|
|
|
|
|
2016-01-17 03:42:16 -05:00
|
|
|
|
def test_ascii
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_downcase_properties 'yukihiro matsumoto (matz)', 'Yukihiro MATSUMOTO (MATZ)'
|
|
|
|
|
check_upcase_properties 'YUKIHIRO MATSUMOTO (MATZ)', 'yukihiro matsumoto (matz)'
|
|
|
|
|
check_capitalize_properties 'Yukihiro matsumoto (matz)', 'yukihiro MATSUMOTO (MATZ)'
|
|
|
|
|
check_swapcase_properties 'yUKIHIRO matsumoto (MAtz)', 'Yukihiro MATSUMOTO (maTZ)'
|
2016-01-16 03:24:58 -05:00
|
|
|
|
end
|
|
|
|
|
|
2016-06-01 21:24:52 -04:00
|
|
|
|
def test_invalid
|
|
|
|
|
assert_raise(ArgumentError, "Should not be possible to upcase invalid string.") { "\xEB".force_encoding('UTF-8').upcase }
|
|
|
|
|
assert_raise(ArgumentError, "Should not be possible to downcase invalid string.") { "\xEB".force_encoding('UTF-8').downcase }
|
|
|
|
|
assert_raise(ArgumentError, "Should not be possible to capitalize invalid string.") { "\xEB".force_encoding('UTF-8').capitalize }
|
|
|
|
|
assert_raise(ArgumentError, "Should not be possible to swapcase invalid string.") { "\xEB".force_encoding('UTF-8').swapcase }
|
|
|
|
|
end
|
|
|
|
|
|
2016-03-16 02:44:05 -04:00
|
|
|
|
def test_general
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_downcase_properties 'résumé dürst ĭñŧėřŋãţijňőńæłĩżàťïōņ', 'RÉSUMÉ DÜRST ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤÏŌŅ'
|
|
|
|
|
check_upcase_properties 'RÉSUMÉ DÜRST ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤÏŌŅ', 'résumé dürst ĭñŧėřŋãţijňőńæłĩżàťïōņ'
|
2016-03-16 02:44:05 -04:00
|
|
|
|
check_capitalize_suffixes 'résumé dürst ĭñŧėřŋãţijňőńæłĩżàťïōņ', 'RÉSUMÉ DÜRST ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤÏŌŅ'
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_swapcase_properties 'résumé DÜRST ĭñŧėřŊÃŢIJŇŐŃæłĩżàťïōņ', 'RÉSUMÉ dürst ĬÑŦĖŘŋãţijňőńÆŁĨŻÀŤÏŌŅ'
|
2016-03-16 02:44:05 -04:00
|
|
|
|
end
|
|
|
|
|
|
2016-05-24 19:01:39 -04:00
|
|
|
|
def test_one_way_upcase
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_upcase_properties 'ΜΜΜΜΜ', 'µµµµµ' # MICRO SIGN -> Greek Mu
|
|
|
|
|
check_downcase_properties 'µµµµµ', 'µµµµµ' # MICRO SIGN -> Greek Mu
|
|
|
|
|
check_capitalize_properties 'Μµµµµ', 'µµµµµ' # MICRO SIGN -> Greek Mu
|
2016-05-24 19:01:39 -04:00
|
|
|
|
check_capitalize_properties 'Μµµµµ', 'µµµµµ', :turkic # MICRO SIGN -> Greek Mu
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_capitalize_properties 'H̱ẖẖẖẖ', 'ẖẖẖẖẖ'
|
|
|
|
|
check_capitalize_properties 'Βϐϐϐϐ', 'ϐϐϐϐϐ'
|
|
|
|
|
check_capitalize_properties 'Θϑϑϑϑ', 'ϑϑϑϑϑ'
|
|
|
|
|
check_capitalize_properties 'Φϕ', 'ϕϕ'
|
|
|
|
|
check_capitalize_properties 'Πϖ', 'ϖϖ'
|
|
|
|
|
check_capitalize_properties 'Κϰ', 'ϰϰ'
|
|
|
|
|
check_capitalize_properties 'Ρϱϱ', 'ϱϱϱ'
|
|
|
|
|
check_capitalize_properties 'Εϵ', 'ϵϵ'
|
|
|
|
|
check_capitalize_properties 'Ιͅͅͅͅ', 'ͅͅͅͅͅ'
|
|
|
|
|
check_capitalize_properties 'Sſſſſ', 'ſſſſſ'
|
2016-05-24 19:01:39 -04:00
|
|
|
|
end
|
|
|
|
|
|
2016-03-16 23:09:00 -04:00
|
|
|
|
def test_various
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_upcase_properties 'Μ', 'µ' # MICRO SIGN -> Greek Mu
|
|
|
|
|
check_downcase_properties 'µµµµµ', 'µµµµµ' # MICRO SIGN
|
|
|
|
|
check_capitalize_properties 'Ss', 'ß'
|
|
|
|
|
check_upcase_properties 'SS', 'ß'
|
2016-03-16 23:09:00 -04:00
|
|
|
|
end
|
|
|
|
|
|
2016-03-16 04:57:34 -04:00
|
|
|
|
def test_cherokee
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_downcase_properties "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79", 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ'
|
|
|
|
|
check_upcase_properties 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79"
|
2016-03-16 04:57:34 -04:00
|
|
|
|
check_capitalize_suffixes "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79", 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ'
|
2016-03-29 03:53:43 -04:00
|
|
|
|
assert_equal 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ'.downcase(:fold)
|
2016-03-16 05:42:45 -04:00
|
|
|
|
assert_equal 'ᎠᎡᎢᎣᎤᎥᎦᎧᎨᎩ', "\uab70\uab71\uab72\uab73\uab74\uab75\uab76\uab77\uab78\uab79".downcase(:fold)
|
2016-03-16 04:57:34 -04:00
|
|
|
|
end
|
|
|
|
|
|
2016-03-22 08:08:30 -04:00
|
|
|
|
def test_titlecase
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_downcase_properties 'dz dž lj nj', 'Dz Dž Lj Nj'
|
|
|
|
|
check_downcase_properties 'dz dž lj nj', 'DZ DŽ LJ NJ'
|
|
|
|
|
check_upcase_properties 'DZ DŽ LJ NJ', 'Dz Dž Lj Nj'
|
|
|
|
|
check_upcase_properties 'DZ DŽ LJ NJ', 'dz dž lj nj'
|
|
|
|
|
check_capitalize_properties 'Dz', 'DZ'
|
|
|
|
|
check_capitalize_properties 'Dž', 'DŽ'
|
|
|
|
|
check_capitalize_properties 'Lj', 'LJ'
|
|
|
|
|
check_capitalize_properties 'Nj', 'NJ'
|
|
|
|
|
check_capitalize_properties 'Dz', 'dz'
|
|
|
|
|
check_capitalize_properties 'Dž', 'dž'
|
|
|
|
|
check_capitalize_properties 'Lj', 'lj'
|
|
|
|
|
check_capitalize_properties 'Nj', 'nj'
|
2016-03-22 08:08:30 -04:00
|
|
|
|
end
|
|
|
|
|
|
2016-04-01 07:58:47 -04:00
|
|
|
|
def test_swapcase
|
2016-06-06 00:16:49 -04:00
|
|
|
|
assert_equal 'dZ', 'Dz'.swapcase
|
|
|
|
|
assert_equal 'dŽ', 'Dž'.swapcase
|
|
|
|
|
assert_equal 'lJ', 'Lj'.swapcase
|
|
|
|
|
assert_equal 'nJ', 'Nj'.swapcase
|
|
|
|
|
assert_equal 'ἀΙ', 'ᾈ'.swapcase
|
|
|
|
|
assert_equal 'ἣΙ', 'ᾛ'.swapcase
|
|
|
|
|
assert_equal 'ὧΙ', 'ᾯ'.swapcase
|
|
|
|
|
assert_equal 'αΙ', 'ᾼ'.swapcase
|
|
|
|
|
assert_equal 'ηΙ', 'ῌ'.swapcase
|
|
|
|
|
assert_equal 'ωΙ', 'ῼ'.swapcase
|
2016-04-01 07:58:47 -04:00
|
|
|
|
end
|
|
|
|
|
|
2016-02-05 06:09:07 -05:00
|
|
|
|
def test_ascii_option
|
|
|
|
|
check_downcase_properties 'yukihiro matsumoto (matz)', 'Yukihiro MATSUMOTO (MATZ)', :ascii
|
|
|
|
|
check_upcase_properties 'YUKIHIRO MATSUMOTO (MATZ)', 'yukihiro matsumoto (matz)', :ascii
|
|
|
|
|
check_capitalize_properties 'Yukihiro matsumoto (matz)', 'yukihiro MATSUMOTO (MATZ)', :ascii
|
|
|
|
|
check_swapcase_properties 'yUKIHIRO matsumoto (MAtz)', 'Yukihiro MATSUMOTO (maTZ)', :ascii
|
|
|
|
|
check_downcase_properties 'yukİhİro matsumoto (matz)', 'YUKİHİRO MATSUMOTO (MATZ)', :ascii
|
|
|
|
|
check_downcase_properties 'rÉsumÉ dÜrst ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤĬŌŅ', 'RÉSUMÉ DÜRST ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤĬŌŅ', :ascii
|
|
|
|
|
check_swapcase_properties 'rÉsumÉ dÜrst ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤĬŌŅ', 'RÉSUMÉ DÜRST ĬÑŦĖŘŊÃŢIJŇŐŃÆŁĨŻÀŤĬŌŅ', :ascii
|
|
|
|
|
end
|
|
|
|
|
|
2016-02-06 00:37:29 -05:00
|
|
|
|
def test_fold_option
|
|
|
|
|
check_downcase_properties 'ss', 'ß', :fold
|
|
|
|
|
check_downcase_properties 'fifl', 'fifl', :fold
|
|
|
|
|
check_downcase_properties 'σ', 'ς', :fold
|
2016-02-06 01:18:38 -05:00
|
|
|
|
check_downcase_properties 'μ', 'µ', :fold # MICRO SIGN -> Greek mu
|
2016-02-06 00:37:29 -05:00
|
|
|
|
end
|
|
|
|
|
|
2016-01-17 03:42:16 -05:00
|
|
|
|
def test_turcic
|
2016-01-17 06:40:46 -05:00
|
|
|
|
check_downcase_properties 'yukihiro matsumoto (matz)', 'Yukihiro MATSUMOTO (MATZ)', :turkic
|
|
|
|
|
check_upcase_properties 'YUKİHİRO MATSUMOTO (MATZ)', 'Yukihiro Matsumoto (matz)', :turkic
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_downcase_properties "yuki\u0307hi\u0307ro matsumoto (matz)", 'YUKİHİRO MATSUMOTO (MATZ)'
|
2016-01-17 03:42:16 -05:00
|
|
|
|
end
|
|
|
|
|
|
2016-03-29 03:53:43 -04:00
|
|
|
|
def test_greek
|
2016-06-06 00:16:49 -04:00
|
|
|
|
check_downcase_properties 'αβγδεζηθικλμνξοπρστυφχψω', 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ'
|
|
|
|
|
check_upcase_properties 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ', 'αβγδεζηθικλμνξοπρστυφχψω'
|
2016-03-29 03:53:43 -04:00
|
|
|
|
end
|
|
|
|
|
|
2016-12-03 02:18:41 -05:00
|
|
|
|
# This test checks against problems when changing the order of mapping results
|
|
|
|
|
# in some of the entries of the unfolding table (related to
|
|
|
|
|
# https://bugs.ruby-lang.org/issues/12990).
|
|
|
|
|
def test_reorder_unfold
|
|
|
|
|
# GREEK SMALL LETTER IOTA
|
|
|
|
|
assert_equal 0, "\u03B9" =~ /\u0345/i
|
|
|
|
|
assert_equal 0, "\u0345" =~ /\u03B9/i
|
|
|
|
|
assert_equal 0, "\u03B9" =~ /\u0399/i
|
|
|
|
|
assert_equal 0, "\u0399" =~ /\u03B9/i
|
|
|
|
|
assert_equal 0, "\u03B9" =~ /\u1fbe/i
|
|
|
|
|
assert_equal 0, "\u1fbe" =~ /\u03B9/i
|
|
|
|
|
|
|
|
|
|
# GREEK SMALL LETTER MU
|
|
|
|
|
assert_equal 0, "\u03BC" =~ /\u00B5/i
|
|
|
|
|
assert_equal 0, "\u00B5" =~ /\u03BC/i
|
|
|
|
|
assert_equal 0, "\u03BC" =~ /\u039C/i
|
|
|
|
|
assert_equal 0, "\u039C" =~ /\u03BC/i
|
|
|
|
|
|
|
|
|
|
# CYRILLIC SMALL LETTER MONOGRAPH UK
|
|
|
|
|
assert_equal 0, "\uA64B" =~ /\u1c88/i
|
|
|
|
|
assert_equal 0, "\u1c88" =~ /\uA64B/i
|
|
|
|
|
assert_equal 0, "\uA64B" =~ /\ua64A/i
|
|
|
|
|
assert_equal 0, "\ua64A" =~ /\uA64B/i
|
|
|
|
|
end
|
|
|
|
|
|
implement special behavior for Georgian for String#capitalize
The modern Georgian script is special in that it has an 'uppercase'
variant called MTAVRULI which can be used for emphasis of whole words,
for screamy headlines, and so on. However, in contrast to all other
bicameral scripts, there is no usage of capitalizing the first letter
in a word or a sentence. Words with mixed capitalization are not used
at all.
We therefore implement special behavior for String#capitalize. Formally,
we define String#capitalize as first applying String#downcase for the
whole string, then using titlecase on the first letter. Because Georgian
defines titlecase as the identity function both for MTAVRULI ('uppercase')
and Mkhedruli (lowercase), this results in String#capitalize being
equivalent to String#downcase for Georgian. This avoids undesirable
mixed case.
* enc/unicode.c: Actual implementation
* string.c: Add mention of this special case for documentation
* test/ruby/enc/test_case_mapping.rb: Add two tests, a general one
that uses String#capitalize on some (including nonsensical)
combinations of MTAVRULI and Mkhedruli, and a canary test to
detect the potential assignment of characters to the currently
open slots (holes) at U+1CBB and U+1CBC.
* test/ruby/enc/test_case_comprehensive.rb: Tweak generation of
expectation data.
Together with r65933, this closes issue #14839.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-09 18:14:29 -05:00
|
|
|
|
def test_georgian_canary
|
|
|
|
|
message = "Reexamine implementation of Georgian in String#capitalize"
|
|
|
|
|
assert_equal false, "\u1CBB".match?(/\p{assigned}/), message
|
|
|
|
|
assert_equal false, "\u1CBC".match?(/\p{assigned}/), message
|
|
|
|
|
end
|
|
|
|
|
|
2018-12-10 18:12:12 -05:00
|
|
|
|
def test_georgian_unassigned
|
|
|
|
|
message = "Unassigned codepoints should not be converted"
|
|
|
|
|
assert_equal "\u1CBB", "\u1CBB".capitalize, message
|
|
|
|
|
assert_equal "\u1CBC", "\u1CBC".capitalize, message
|
|
|
|
|
end
|
|
|
|
|
|
implement special behavior for Georgian for String#capitalize
The modern Georgian script is special in that it has an 'uppercase'
variant called MTAVRULI which can be used for emphasis of whole words,
for screamy headlines, and so on. However, in contrast to all other
bicameral scripts, there is no usage of capitalizing the first letter
in a word or a sentence. Words with mixed capitalization are not used
at all.
We therefore implement special behavior for String#capitalize. Formally,
we define String#capitalize as first applying String#downcase for the
whole string, then using titlecase on the first letter. Because Georgian
defines titlecase as the identity function both for MTAVRULI ('uppercase')
and Mkhedruli (lowercase), this results in String#capitalize being
equivalent to String#downcase for Georgian. This avoids undesirable
mixed case.
* enc/unicode.c: Actual implementation
* string.c: Add mention of this special case for documentation
* test/ruby/enc/test_case_mapping.rb: Add two tests, a general one
that uses String#capitalize on some (including nonsensical)
combinations of MTAVRULI and Mkhedruli, and a canary test to
detect the potential assignment of characters to the currently
open slots (holes) at U+1CBB and U+1CBC.
* test/ruby/enc/test_case_comprehensive.rb: Tweak generation of
expectation data.
Together with r65933, this closes issue #14839.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-09 18:14:29 -05:00
|
|
|
|
def test_georgian_capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u1C90\u1C91\u1C92".capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u1C90\u1C91\u10D2".capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u1C90\u10D1\u1C92".capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u1C90\u10D1\u10D2".capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u10D0\u1C91\u1C92".capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u10D0\u1C91\u10D2".capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u10D0\u10D1\u1C92".capitalize
|
|
|
|
|
assert_equal "\u10D0\u10D1\u10D2", "\u10D0\u10D1\u10D2".capitalize
|
|
|
|
|
end
|
|
|
|
|
|
2019-05-16 20:53:47 -04:00
|
|
|
|
def test_shift_jis_downcase_ascii
|
|
|
|
|
s = ("A".."Z").map {|c| "\x89#{c}"}.join("").force_encoding("Shift_JIS")
|
|
|
|
|
assert_equal s, s.downcase(:ascii)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def test_shift_jis_upcase_ascii
|
|
|
|
|
s = ("a".."z").map {|c| "\x89#{c}"}.join("").force_encoding("Shift_JIS")
|
|
|
|
|
assert_equal s, s.upcase(:ascii)
|
|
|
|
|
end
|
|
|
|
|
|
2016-01-17 03:42:16 -05:00
|
|
|
|
def no_longer_a_test_buffer_allocations
|
2016-06-06 00:16:49 -04:00
|
|
|
|
assert_equal 'TURKISH*ı'*10, ('I'*10).downcase(:turkic)
|
|
|
|
|
assert_equal 'TURKISH*ı'*100, ('I'*100).downcase(:turkic)
|
|
|
|
|
assert_equal 'TURKISH*ı'*1_000, ('I'*1_000).downcase(:turkic)
|
|
|
|
|
assert_equal 'TURKISH*ı'*10_000, ('I'*10_000).downcase(:turkic)
|
|
|
|
|
assert_equal 'TURKISH*ı'*100_000, ('I'*100_000).downcase(:turkic)
|
|
|
|
|
assert_equal 'TURKISH*ı'*1_000_000, ('I'*1_000_000).downcase(:turkic)
|
2016-01-15 20:24:03 -05:00
|
|
|
|
end
|
|
|
|
|
end
|