[Groonga-commit] groonga/groonga at d7de6b2 [master] Add tests for scalar reference output

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jun 12 12:33:41 JST 2013


Kouhei Sutou	2013-06-12 12:33:41 +0900 (Wed, 12 Jun 2013)

  New Revision: d7de6b261483443eb96e0ebc701284322f92f685
  https://github.com/groonga/groonga/commit/d7de6b261483443eb96e0ebc701284322f92f685

  Message:
    Add tests for scalar reference output

  Added files:
    test/command/suite/select/output_columns/scalar/reference/no_key/json.expected
    test/command/suite/select/output_columns/scalar/reference/no_key/json.test
    test/command/suite/select/output_columns/scalar/reference/no_key/xml.expected
    test/command/suite/select/output_columns/scalar/reference/no_key/xml.test

  Added: test/command/suite/select/output_columns/scalar/reference/no_key/json.expected (+40 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/no_key/json.expected    2013-06-12 12:33:41 +0900 (8a37eed)
@@ -0,0 +1,40 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+table_create Bookmarks TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Bookmarks user COLUMN_SCALAR Users
+[[0,0.0,0.0],true]
+load --table Bookmarks
+[
+{"_key": "http://groonga.org/", "user": "mori"}
+]
+[[0,0.0,0.0],1]
+select Bookmarks --output_columns _key,user
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "_key",
+          "ShortText"
+        ],
+        [
+          "user",
+          "Users"
+        ]
+      ],
+      [
+        "http://groonga.org/",
+        "mori"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/output_columns/scalar/reference/no_key/json.test (+11 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/no_key/json.test    2013-06-12 12:33:41 +0900 (b74f479)
@@ -0,0 +1,11 @@
+table_create Users TABLE_HASH_KEY ShortText
+
+table_create Bookmarks TABLE_HASH_KEY ShortText
+column_create Bookmarks user COLUMN_SCALAR Users
+
+load --table Bookmarks
+[
+{"_key": "http://groonga.org/", "user": "mori"}
+]
+
+select Bookmarks --output_columns _key,user

  Added: test/command/suite/select/output_columns/scalar/reference/no_key/xml.expected (+27 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/no_key/xml.expected    2013-06-12 12:33:41 +0900 (c340b76)
@@ -0,0 +1,27 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+table_create Bookmarks TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Bookmarks user COLUMN_SCALAR Users
+[[0,0.0,0.0],true]
+load --table Bookmarks
+[
+{"_key": "http://groonga.org/", "user": "mori"}
+]
+[[0,0.0,0.0],1]
+select Bookmarks --output_columns _key,user --output_type xml
+<?xml version="1.0" encoding="utf-8"?>
+<SEGMENTS>
+<SEGMENT>
+<RESULTPAGE>
+<RESULTSET OFFSET="0" LIMIT="1" NHITS="1">
+<HIT NO="1">
+<FIELD NAME="_key">http://groonga.org/</FIELD>
+<FIELD NAME="user">mori</FIELD>
+</HIT>
+</RESULTSET>
+</RESULTPAGE>
+</SEGMENT>
+</SEGMENTS>
+
+

  Added: test/command/suite/select/output_columns/scalar/reference/no_key/xml.test (+11 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/no_key/xml.test    2013-06-12 12:33:41 +0900 (f4fc50d)
@@ -0,0 +1,11 @@
+table_create Users TABLE_HASH_KEY ShortText
+
+table_create Bookmarks TABLE_HASH_KEY ShortText
+column_create Bookmarks user COLUMN_SCALAR Users
+
+load --table Bookmarks
+[
+{"_key": "http://groonga.org/", "user": "mori"}
+]
+
+select Bookmarks --output_columns _key,user --output_type xml
-------------- next part --------------
HTML����������������������������...
Download 



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