aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/enc
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/enc')
-rw-r--r--test/ruby/enc/test_case_mapping.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/enc/test_case_mapping.rb b/test/ruby/enc/test_case_mapping.rb
index aa20531783..31acdc4331 100644
--- a/test/ruby/enc/test_case_mapping.rb
+++ b/test/ruby/enc/test_case_mapping.rb
@@ -210,6 +210,16 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase
assert_equal "\u10D0\u10D1\u10D2", "\u10D0\u10D1\u10D2".capitalize
end
+ 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
+
def no_longer_a_test_buffer_allocations
assert_equal 'TURKISH*ı'*10, ('I'*10).downcase(:turkic)
assert_equal 'TURKISH*ı'*100, ('I'*100).downcase(:turkic)