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

ruby-changes:35897

From: akr <ko1@a...>
Date: Thu, 16 Oct 2014 20:18:17 +0900 (JST)
Subject: [ruby-changes:35897] akr:r47978 (trunk): * test/ruby/envutil.rb (assert_pattern_list): Show number of matched

akr	2014-10-16 20:18:06 +0900 (Thu, 16 Oct 2014)

  New Revision: 47978

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

  Log:
    * test/ruby/envutil.rb (assert_pattern_list): Show number of matched
      patterns and characters.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/envutil.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47977)
+++ ChangeLog	(revision 47978)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Oct 16 20:01:26 2014  Tanaka Akira  <akr@f...>
+
+	* test/ruby/envutil.rb (assert_pattern_list): Show number of matched
+	  patterns and characters.
+
 Thu Oct 16 16:26:09 2014  Eric Wong  <e@8...>
 
 	* cont.c (fiber_store): fix WIN32 fibers
Index: test/ruby/envutil.rb
===================================================================
--- test/ruby/envutil.rb	(revision 47977)
+++ test/ruby/envutil.rb	(revision 47978)
@@ -485,7 +485,7 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L485
       def assert_pattern_list(pattern_list, actual, message=nil)
         rest = actual
         anchored = true
-        pattern_list.each {|pattern|
+        pattern_list.each_with_index {|pattern, i|
           if pattern == :*
             anchored = false
           else
@@ -506,6 +506,7 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/envutil.rb#L506
                 else
                   actual_mesg = "to match #{mu_pp rest}"
                 end
+                actual_mesg << "\nafter #{i} patterns with #{actual.length - rest.length} characters"
                 expect_msg + actual_mesg
               }
               assert false, msg

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

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