summaryrefslogtreecommitdiff
path: root/test/ripper/test_parser_events.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 19:13:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-22 19:13:46 +0000
commit48f2a5fcc4ef40e29a7935c1f57c02aefe1995cb (patch)
treef6bd95a7967e37ecfa09bffaf296ba0ba805cc78 /test/ripper/test_parser_events.rb
parent2dc5fdec0130e1b6d553a843d266b53e62efe836 (diff)
* 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
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r--test/ripper/test_parser_events.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 527c290..0218312 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -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}