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

* test/ripper/test_parser_events.rb: more regexp literal tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-04-22 19:13:46 +00:00
parent 2dc5fdec01
commit 48f2a5fcc4

View file

@ -732,12 +732,24 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
assert_equal true, thru_redo
end
def test_regexp_add
thru_regexp_add = false
parse('/foo/', :on_regexp_add) {thru_regexp_add = true}
assert_equal true, thru_regexp_add
end
def test_regexp_literal
thru_regexp_literal = false
parse('//', :on_regexp_literal) {thru_regexp_literal = true}
assert_equal true, thru_regexp_literal
end
def test_regexp_new
thru_regexp_new = false
parse('//', :on_regexp_new) {thru_regexp_new = true}
assert_equal true, thru_regexp_new
end
def test_rescue
thru_rescue = false
parse('begin; rescue; end', :on_rescue) {thru_rescue = true}