зеркало из https://github.com/github/ruby.git
Test for unterminated here-docs
This commit is contained in:
Родитель
c86a9e6592
Коммит
2a56702eee
|
@ -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}
|
||||
|
|
Загрузка…
Ссылка в новой задаче