diff options
Diffstat (limited to 'test/ripper')
-rw-r--r-- | test/ripper/test_parser_events.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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} |