[Groonga-commit] groonga/groonga-test [master] Normalize actual result for easy to compare

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 2日 (金) 18:19:15 JST


Kouhei Sutou	2012-03-02 18:19:15 +0900 (Fri, 02 Mar 2012)

  New Revision: 7da0f35a29e781a2636d1e82ef809874dfab3348

  Log:
    Normalize actual result for easy to compare

  Modified files:
    bin/groonga-test

  Modified: bin/groonga-test (+5 -0)
===================================================================
--- bin/groonga-test    2012-03-02 18:18:59 +0900 (a627113)
+++ bin/groonga-test    2012-03-02 18:19:15 +0900 (ad7f3bf)
@@ -55,6 +55,7 @@ class GroongaTester
 
     @reporter.start_test(test_script_path)
     actual_result = run_groonga_script(test_script_path)
+    actual_result = normalize_result(actual_result)
     expected_result = read_expected_result(test_script_path)
     if expected_result
       if actual_result == expected_result
@@ -109,6 +110,10 @@ class GroongaTester
     end
   end
 
+  def normalize_result(result)
+    result.gsub(/^\[\[0,[\d\.e\-]+,[\d\.e\-]+\]/, "[[0,0.0,0.0]")
+  end
+
   def read_output(io)
     output = ""
     first_timeout = 1




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