summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-16 00:49:46 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-16 00:49:46 +0000
commitdaeefae9b4430c968e75892dda91e48f68e7bbad (patch)
tree5344875d4d3580b88174e2562fef482aa3dc9735 /test/ruby
parentd6db2d952e2c6e65fb95a6cabfc3acd07592178c (diff)
downloadruby-daeefae9b4430c968e75892dda91e48f68e7bbad.tar.gz
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
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_rubyoptions.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index dac38a1dc9..0fc96b5743 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -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