Kouhei Sutou
null+****@clear*****
Thu Nov 20 14:04:28 JST 2014
Kouhei Sutou 2014-11-20 14:04:28 +0900 (Thu, 20 Nov 2014) New Revision: 253a7bc4c56930348d62bbf5725d897e265f50b0 https://github.com/groonga/groonga-query-log/commit/253a7bc4c56930348d62bbf5725d897e265f50b0 Message: Use label option Modified files: lib/groonga/query-log/command/format-regression-test-logs.rb Modified: lib/groonga/query-log/command/format-regression-test-logs.rb (+4 -3) =================================================================== --- lib/groonga/query-log/command/format-regression-test-logs.rb 2014-11-20 11:49:57 +0900 (1744c2b) +++ lib/groonga/query-log/command/format-regression-test-logs.rb 2014-11-20 14:04:28 +0900 (25c494d) @@ -109,15 +109,16 @@ module Groonga def report_diff(command, response1, response2) return if response1 == response2 - base_name = File.basename(path, ".*") - Tempfile.open("response1-#{base_name}") do |response1_file| + Tempfile.open("response1") do |response1_file| PP.pp(JSON.parse(response1), response1_file) response1_file.flush - Tempfile.open("response2-#{base_name}") do |response2_file| + Tempfile.open("response2") do |response2_file| PP.pp(JSON.parse(response2), response2_file) response2_file.flush puts(command) system("diff", + "--label=old", + "--label=new", "-u", response1_file.path, response2_file.path) end -------------- next part -------------- HTML����������������������������...Download