null+****@clear*****
null+****@clear*****
2010年 6月 25日 (金) 15:26:47 JST
Kouhei Sutou 2010-06-25 06:26:47 +0000 (Fri, 25 Jun 2010) New Revision: 72d36ad3498f75c31cf2377267561133ac67a414 Log: follow XML format change. Modified files: test/unit/http/test-http-select-basic.rb test/unit/lib/ruby/groonga-http-test-utils.rb Modified: test/unit/http/test-http-select-basic.rb (+9 -11) =================================================================== --- test/unit/http/test-http-select-basic.rb 2010-06-25 06:25:59 +0000 (d121912) +++ test/unit/http/test-http-select-basic.rb 2010-06-25 06:26:47 +0000 (1346a05) @@ -765,17 +765,15 @@ EOF load_many_users expected = <<EOF <?xml version="1.0" encoding="utf-8"?> -<SEGMENTS> -<SEGMENT> -<RESULTPAGE> -<RESULTSET OFFSET="2" LIMIT="1" NHITS="5"> -<HIT NO="3"> -<FIELD NAME="_id">1</FIELD> -</HIT> -</RESULTSET> -</RESULTPAGE> -</SEGMENT> -</SEGMENTS> +<RESULT CODE="0" UP="0.0" ELAPSED="0.0"><RESULTPAGE> +<RESULTSET> +<NHITS>5</NHITS> +<COLUMNS> +<COLUMN> +<TEXT>_id</TEXT> +<TEXT>UInt32</TEXT></COLUMN></COLUMNS> +<HIT> +<INT>1</INT></HIT></RESULTSET></RESULTPAGE></RESULT> EOF assert_select_xml(expected.strip, {:table => "users", :offset => 2, :limit => 1, Modified: test/unit/lib/ruby/groonga-http-test-utils.rb (+6 -2) =================================================================== --- test/unit/lib/ruby/groonga-http-test-utils.rb 2010-06-25 06:25:59 +0000 (aad4ad7) +++ test/unit/lib/ruby/groonga-http-test-utils.rb 2010-06-25 06:26:47 +0000 (a496241) @@ -268,7 +268,11 @@ module GroongaHTTPTestUtils assert_response(expected, response, - :content_type => "text/xml", - &block) + :content_type => "text/xml") do |xml| + xml = xml.gsub(/UP="\d+\.\d+" ELAPSED="\d+\.\d+"/, + "UP=\"0.0\" ELAPSED=\"0.0\"") + xml = block.call(xml) if block + xml + end end end