[Groonga-commit] groonga/fluent-plugin-droonga at d200e33 [master] test adapter_select: add a test that checks a pattern output_columns has single argument function

Back to archive index

Kosuke Asami null+****@clear*****
Tue Jul 23 15:22:34 JST 2013


Kosuke Asami	2013-07-23 15:22:34 +0900 (Tue, 23 Jul 2013)

  New Revision: d200e3310e3218a781b3f230860f09c31a00772c
  https://github.com/groonga/fluent-plugin-droonga/commit/d200e3310e3218a781b3f230860f09c31a00772c

  Message:
    test adapter_select: add a test that checks a pattern output_columns has single argument function

  Modified files:
    test/plugin/adapter/groonga/test_select.rb

  Modified: test/plugin/adapter/groonga/test_select.rb (+29 -0)
===================================================================
--- test/plugin/adapter/groonga/test_select.rb    2013-07-23 15:15:25 +0900 (168ebb8)
+++ test/plugin/adapter/groonga/test_select.rb    2013-07-23 15:22:34 +0900 (327b677)
@@ -80,6 +80,35 @@ class AdapterGroongaSelectTest < Test::Unit::TestCase
 
         assert_equal(expected_search_request, convert(select_request))
       end
+
+      class FunctionTest < self
+        def test_single_argument
+          select_request = {
+            "table" => "EmptyTable",
+            "output_columns" => "snippet_html(content)",
+          }
+
+          expected_search_request = {
+            "queries" => {
+              "EmptyTable" => {
+                "source"   => "EmptyTable",
+                "output"   => {
+                  "elements"   => [
+                    "startTime",
+                    "elapsedTime",
+                    "count",
+                    "attributes",
+                    "records",
+                  ],
+                  "attributes" => ["snippet_html(content)"],
+                },
+              },
+            },
+          }
+
+          assert_equal(expected_search_request, convert(select_request))
+        end
+      end
     end
   end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index