From 48f2a5fcc4ef40e29a7935c1f57c02aefe1995cb Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 22 Apr 2010 19:13:46 +0000 Subject: * 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 --- test/ripper/test_parser_events.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ripper') diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index 527c29023f..02183129b0 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} -- cgit v1.2.3