mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_rubyoptions.rb: show code in failure messages
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d6db2d952e
commit
daeefae9b4
1 changed files with 5 additions and 3 deletions
|
@ -944,9 +944,11 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
frozen.product(debugs) do |(opt1, freeze), (opt2, debug)|
|
||||
opt = opts + [opt1, opt2].compact
|
||||
err = !freeze ? [] : debug ? with_debug_pat : wo_debug_pat
|
||||
assert_in_out_err(opt, '"foo" << "bar"', [], err)
|
||||
if freeze
|
||||
assert_in_out_err(opt, '"foo#{123}bar" << "bar"', [], err)
|
||||
[
|
||||
['"foo" << "bar"', err],
|
||||
['"foo#{123}bar" << "bar"', err],
|
||||
].each do |code, expected|
|
||||
assert_in_out_err(opt, code, [], expected, [opt, code])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue