diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-20 21:30:46 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-20 21:30:46 +0900 |
| commit | a6941101933a06e234f57a180d7119eafa9f1904 (patch) | |
| tree | 192aead21f0cab7a50d0d5c9ef5518ad3278013c /mrbgems/mruby-symbol-ext/test | |
| parent | a6d8df6761a0c84f0cd275a709050c187f60b35f (diff) | |
| parent | bb52324bd95628b75925693340577d4390a2c564 (diff) | |
| download | mruby-a6941101933a06e234f57a180d7119eafa9f1904.tar.gz mruby-a6941101933a06e234f57a180d7119eafa9f1904.zip | |
Merge pull request #2089 from ksss/sym-casecmp
Implement Symbol#casecmp
Diffstat (limited to 'mrbgems/mruby-symbol-ext/test')
| -rw-r--r-- | mrbgems/mruby-symbol-ext/test/symbol.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mrbgems/mruby-symbol-ext/test/symbol.rb b/mrbgems/mruby-symbol-ext/test/symbol.rb index 35bb31aef..e886a58d7 100644 --- a/mrbgems/mruby-symbol-ext/test/symbol.rb +++ b/mrbgems/mruby-symbol-ext/test/symbol.rb @@ -29,6 +29,13 @@ assert("Symbol#upcase") do assert_equal :HELLO, :hEllO.upcase end +assert("Symbol#casecmp") do + assert_equal 0, :HELLO.casecmp(:hEllO) + assert_equal 1, :HELLO.casecmp(:hEllN) + assert_equal -1, :HELLO.casecmp(:hEllP) + assert_nil :HELLO.casecmp("hEllO") +end + assert("Symbol#empty?") do assert_true :''.empty? end |
