[前][次][番号順一覧][スレッド一覧]

ruby-changes:50300

From: nobu <ko1@a...>
Date: Fri, 16 Feb 2018 09:49:52 +0900 (JST)
Subject: [ruby-changes:50300] nobu:r62415 (trunk): test_rubyoptions.rb: show code in failure messages

nobu	2018-02-16 09:49:46 +0900 (Fri, 16 Feb 2018)

  New Revision: 62415

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62415

  Log:
    test_rubyoptions.rb: show code in failure messages

  Modified files:
    trunk/test/ruby/test_rubyoptions.rb
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 62414)
+++ test/ruby/test_rubyoptions.rb	(revision 62415)
@@ -944,9 +944,11 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L944
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]