diff options
Diffstat (limited to 'test/ripper')
-rw-r--r-- | test/ripper/test_scanner_events.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb index ab52392eb1..1b7b56ebfe 100644 --- a/test/ripper/test_scanner_events.rb +++ b/test/ripper/test_scanner_events.rb @@ -103,6 +103,12 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase [[5, 0], :on_imaginary, "5.6ri"], ], Ripper.lex("1r\n2i\n3ri\n4.2r\n5.6ri") + assert_equal [[[1, 0], :on_heredoc_beg, "<<~EOS"], + [[1, 6], :on_nl, "\n"], + [[2, 2], :on_tstring_content, "heredoc\n"], + [[3, 0], :on_heredoc_end, "EOS"] + ], + Ripper.lex("<<~EOS\n heredoc\nEOS") end def test_location |