[Groonga-commit] groonga/groonga [master] follow JSON format change.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 7月 14日 (水) 17:27:27 JST


Kouhei Sutou	2010-07-14 08:27:27 +0000 (Wed, 14 Jul 2010)

  New Revision: 06137f15ee9e59e1feb644f21913895381a1d91d

  Log:
    follow JSON format change.

  Modified files:
    test/unit/gqtp/test-cache.rb

  Modified: test/unit/gqtp/test-cache.rb (+11 -11)
===================================================================
--- test/unit/gqtp/test-cache.rb    2010-07-14 08:23:21 +0000 (e43e24a)
+++ test/unit/gqtp/test-cache.rb    2010-07-14 08:27:27 +0000 (3123229)
@@ -29,12 +29,12 @@ class CacheTest < Test::Unit::TestCase
 
   def test_cache_with_illegal_select
     assert_commands(<<EXPECTED, <<COMMANDS)
-[true]
-[true]
-[true]
-[true]
-[1]
-[true]
+[[0,0.0,0.0],true]
+[[0,0.0,0.0],true]
+[[0,0.0,0.0],true]
+[[0,0.0,0.0],true]
+[[0,0.0,0.0],1]
+[[0,0.0,0.0],true]
 EXPECTED
 table_create --name Site --flags TABLE_HASH_KEY --key_type ShortText
 column_create --table Site --name title --flags COLUMN_SCALAR --type ShortText
@@ -47,9 +47,9 @@ load --table Site
 COMMANDS
 
     expected= <<EXPECTED
-[]
-[]
-[true]
+[[-63,0.0,0.0,"Syntax error! (<)",[["yy_syntax_error","ecmascript.y",19]]],[]]
+[[-63,0.0,0.0,"Syntax error! (<)",[["yy_syntax_error","ecmascript.y",19]]],[]]
+[[0,0.0,0.0],true]
 EXPECTED
 
     commands = <<COMMANDS
@@ -70,8 +70,8 @@ COMMANDS
 
   private
   def assert_error_command_output(expected, actual)
-    actual = actual.gsub(/^\[\[(-63|0),[\d\.e\-]+,[\d\.e\-]+(,".*"|)\]/) do
-      "[[#{$1},0.0,0.0#{$2}]"
+    actual = actual.gsub(/^\[\[(-63|0),[\d\.e\-]+,[\d\.e\-]+/) do
+      "[[#{$1},0.0,0.0"
     end
     assert_equal(expected, actual)
   end




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