mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Test for unterminated here-docs
This commit is contained in:
parent
c86a9e6592
commit
2a56702eee
1 changed files with 6 additions and 0 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue