aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/enc/test_case_mapping.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/enc/test_case_mapping.rb')
-rw-r--r--test/ruby/enc/test_case_mapping.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/test/ruby/enc/test_case_mapping.rb b/test/ruby/enc/test_case_mapping.rb
index d42b6b1cb6..eb36d7d665 100644
--- a/test/ruby/enc/test_case_mapping.rb
+++ b/test/ruby/enc/test_case_mapping.rb
@@ -5,14 +5,25 @@ require "test/unit"
# preliminary tests, using :lithuanian as a guard
# to test new implementation strategy
class TestCaseMappingPreliminary < Test::Unit::TestCase
- def test_case_mapping_preliminary
+ def test_ascii
assert_equal 'yukihiro matsumoto (matz)',
'Yukihiro MATSUMOTO (MATZ)'.downcase(:lithuanian)
- assert_equal 'matsumoto yukTURKISH*ıhTURKISH*ıro (matz)',
- 'MATSUMOTO YUKIHIRO (MATZ)'.downcase(:turkic, :lithuanian)
+ assert_equal 'YUKIHIRO MATSUMOTO (MATZ)',
+ 'yukihiro matsumoto (matz)'.upcase(:lithuanian)
+ assert_equal 'Yukihiro matsumoto (matz)',
+ 'yukihiro MATSUMOTO (MATZ)'.capitalize(:lithuanian)
+ assert_equal 'yUKIHIRO matsumoto (MAtz)',
+ 'Yukihiro MATSUMOTO (maTZ)'.swapcase(:lithuanian)
end
- def test_buffer_allocations
+ def test_turcic
+ assert_equal 'yukihiro matsumoto (matz)',
+ 'Yukihiro MATSUMOTO (MATZ)'.downcase(:turkic, :lithuanian)
+ assert_equal 'YUKİHİRO MATSUMOTO (MATZ)',
+ 'Yukihiro Matsumoto (matz)'.upcase(:turkic, :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)
assert_equal 'TURKISH*ı'*1_000, ('I'*1_000).downcase(:turkic, :lithuanian)