mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
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
This commit is contained in:
parent
47f2bd9334
commit
913afdf95c
2 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue