aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index b1d795e183..90f48e4f08 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -2210,6 +2210,13 @@ CODE
assert_equal(1, "\u3042B".casecmp("\u3042a"))
end
+ def test_casecmp?
+ assert_equal(true, 'FoO'.casecmp?('fOO'))
+ assert_equal(false, 'FoO'.casecmp?('BaR'))
+ assert_equal(false, 'baR'.casecmp?('FoO'))
+ assert_equal(true, 'äöü'.casecmp?('ÄÖÜ'))
+ end
+
def test_upcase2
assert_equal("\u3042AB", "\u3042aB".upcase)
end