1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_flip.rb: add

* test/ruby/test_flip.rb (test_flip_flop): basic test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-09-30 12:46:53 +00:00
parent 107ba65fba
commit ed2af78b67

View file

@ -2,6 +2,11 @@
require 'test/unit'
class TestFlip < Test::Unit::TestCase
def test_flip_flop
assert_equal [2], (1..9).select {|n| true if (n==2)..(n%2).zero?}
assert_equal [2,3,4], (1..9).select {|n| true if (n==2)...(n%2).zero?}
end
def test_hidden_key
bug6899 = '[ruby-core:47253]'
foo = "foor"