[Groonga-commit] groonga/groonga-test [master] Log also command name and output format

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 6日 (火) 15:14:48 JST


Kouhei Sutou	2012-03-06 15:14:48 +0900 (Tue, 06 Mar 2012)

  New Revision: bd8873e2a18cb0c809523f05c3b307f98b7dc154

  Log:
    Log also command name and output format

  Modified files:
    bin/groonga-test

  Modified: bin/groonga-test (+8 -6)
===================================================================
--- bin/groonga-test    2012-03-06 15:13:41 +0900 (d4817cc)
+++ bin/groonga-test    2012-03-06 15:14:48 +0900 (5d329ef)
@@ -145,7 +145,7 @@ class GroongaTester
 
     def normalize_result(result)
       normalized_result = ""
-      result.each do |tag, content|
+      result.each do |tag, content, options|
         case tag
         when :input
           normalized_result << content
@@ -389,14 +389,14 @@ class GroongaTester
       output
     end
 
-    def log(tag, content)
+    def log(tag, content, options={})
       return unles****@conte*****
       return if content.empty?
-      log_force(tag, content)
+      log_force(tag, content, options)
     end
 
-    def log_force(tag, content)
-      @context.result << [tag, content]
+    def log_force(tag, content, options)
+      @context.result << [tag, content, options]
     end
 
     def log_input(content)
@@ -404,7 +404,9 @@ class GroongaTester
     end
 
     def log_output(content)
-      log(:output, content)
+      log(:output, content,
+          :command => @current_command,
+          :format => @output_format)
     end
 
     def log_error(content)




Groonga-commit メーリングリストの案内
Back to archive index