[Groonga-commit] groonga/grntest [master] Accept multiple --test and --test-suite options

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Oct 12 12:55:23 JST 2012


Kouhei Sutou	2012-10-12 12:55:23 +0900 (Fri, 12 Oct 2012)

  New Revision: daf7ab23657d3ad5ba7ba73aca070ec359cb9058
  https://github.com/groonga/grntest/commit/daf7ab23657d3ad5ba7ba73aca070ec359cb9058

  Log:
    Accept multiple --test and --test-suite options
    
    They means that if any of them is matched, the test is ran.

  Modified files:
    lib/grntest/tester.rb

  Modified: lib/grntest/tester.rb (+4 -2)
===================================================================
--- lib/grntest/tester.rb    2012-10-12 12:50:08 +0900 (47713d7)
+++ lib/grntest/tester.rb    2012-10-12 12:55:23 +0900 (582064a)
@@ -288,7 +288,8 @@ module Grntest
     end
 
     def selected_test?(test_name)
-      @test_patterns.all? do |pattern|
+      return true if @test_patterns.empty?
+      @test_patterns.any? do |pattern|
         pattern === test_name
       end
     end
@@ -305,7 +306,8 @@ module Grntest
     end
 
     def selected_test_suite?(test_suite_name)
-      @test_suite_patterns.all? do |pattern|
+      return true if @test_suite_patterns.empty?
+      @test_suite_patterns.any? do |pattern|
         pattern === test_suite_name
       end
     end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index