зеркало из https://github.com/github/ruby.git
test_syntax.rb: try all
* test/ruby/test_syntax.rb (assert_dedented_heredoc): try all terminators regardless failures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
5ce4a050b5
Коммит
af18eafc44
|
@ -501,10 +501,13 @@ e"
|
|||
end
|
||||
|
||||
def assert_dedented_heredoc(expect, result, mesg = "")
|
||||
%w[eos "eos" 'eos' `eos`].each do |eos|
|
||||
assert_equal(eval("<<-#{eos}\n#{expect}eos\n"),
|
||||
eval("<<~#{eos}\n#{result}eos\n"),
|
||||
message(mesg) {"with #{eos}"})
|
||||
all_assertions(mesg) do |a|
|
||||
%w[eos "eos" 'eos' `eos`].each do |eos|
|
||||
a.for(eos) do
|
||||
assert_equal(eval("<<-#{eos}\n#{expect}eos\n"),
|
||||
eval("<<~#{eos}\n#{result}eos\n"))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче