aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/enc/test_case_mapping.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/enc/test_case_mapping.rb b/test/ruby/enc/test_case_mapping.rb
index b52d86b57a..5fb7339eeb 100644
--- a/test/ruby/enc/test_case_mapping.rb
+++ b/test/ruby/enc/test_case_mapping.rb
@@ -93,6 +93,19 @@ class TestCaseMappingPreliminary < Test::Unit::TestCase
check_capitalize_properties 'Nj', 'nj', :lithuanian
end
+ def test_swapcase
+ assert_equal 'dZ', 'Dz'.swapcase(:lithuanian)
+ assert_equal 'dŽ', 'Dž'.swapcase(:lithuanian)
+ assert_equal 'lJ', 'Lj'.swapcase(:lithuanian)
+ assert_equal 'nJ', 'Nj'.swapcase(:lithuanian)
+ assert_equal 'ἀΙ', 'ᾈ'.swapcase(:lithuanian)
+ assert_equal 'ἣΙ', 'ᾛ'.swapcase(:lithuanian)
+ assert_equal 'ὧΙ', 'ᾯ'.swapcase(:lithuanian)
+ assert_equal 'αΙ', 'ᾼ'.swapcase(:lithuanian)
+ assert_equal 'ηΙ', 'ῌ'.swapcase(:lithuanian)
+ assert_equal 'ωΙ', 'ῼ'.swapcase(:lithuanian)
+ end
+
def test_ascii_option
check_downcase_properties 'yukihiro matsumoto (matz)', 'Yukihiro MATSUMOTO (MATZ)', :ascii
check_upcase_properties 'YUKIHIRO MATSUMOTO (MATZ)', 'yukihiro matsumoto (matz)', :ascii