diff options
Diffstat (limited to 'test/ripper/test_parser_events.rb')
-rw-r--r-- | test/ripper/test_parser_events.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb index 1d2c501c3b..eb423b397e 100644 --- a/test/ripper/test_parser_events.rb +++ b/test/ripper/test_parser_events.rb @@ -485,6 +485,12 @@ class TestRipper::ParserEvents < Test::Unit::TestCase assert_equal(1, width) end + def test_unterminated_heredoc + assert_match("can't find string \"a\" anywhere before EOF", compile_error("<<a")) + assert_match("can't find string \"a\" anywhere before EOF", compile_error('<<"a"')) + assert_match("can't find string \"a\" anywhere before EOF", compile_error("<<'a'")) + end + def test_massign thru_massign = false parse("a, b = 1, 2", :on_massign) {thru_massign = true} |