aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authorstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-21 19:27:08 +0000
committerstomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-21 19:27:08 +0000
commit4527a721964bf265199b50da48a95febc2f62cfc (patch)
treeca4e96cfa480ad79d3ef52ef64be7b6e5ddf6097 /test/ruby/test_string.rb
parente8312dc70e7a256301a51faf3e746c27dcf11c59 (diff)
downloadruby-4527a721964bf265199b50da48a95febc2f62cfc.tar.gz
test_string.rb,test_symbol.rb: add some tests
* test/ruby/test_string.rb: add more test cases for String#casecmp. * test/ruby/test_symbol.rb: ditto for Symbol#{casecmp,casecmp?}. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 0bfca5ad05..e1b27fc2be 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -2317,6 +2317,9 @@ CODE
=end
def test_casecmp
+ assert_equal(0, "FoO".casecmp("fOO"))
+ assert_equal(1, "FoO".casecmp("BaR"))
+ assert_equal(-1, "baR".casecmp("FoO"))
assert_equal(1, "\u3042B".casecmp("\u3042a"))
end