[Groonga-commit] groonga/groonga at 7e9a6b2 [master] Add tests for scalar reference key output

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jun 12 12:10:50 JST 2013


Kouhei Sutou	2013-06-12 12:10:50 +0900 (Wed, 12 Jun 2013)

  New Revision: 7e9a6b2af7814f1bedc144e3369251703e91959f
  https://github.com/groonga/groonga/commit/7e9a6b2af7814f1bedc144e3369251703e91959f

  Message:
    Add tests for scalar reference key output

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

  Added: test/command/suite/select/output_columns/scalar/reference/key/json.expected (+40 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/key/json.expected    2013-06-12 12:10:50 +0900 (2f8667d)
@@ -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._key
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "_key",
+          "ShortText"
+        ],
+        [
+          "user._key",
+          "ShortText"
+        ]
+      ],
+      [
+        "http://groonga.org/",
+        "mori"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/output_columns/scalar/reference/key/json.test (+11 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/key/json.test    2013-06-12 12:10:50 +0900 (b2c06d0)
@@ -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._key

  Added: test/command/suite/select/output_columns/scalar/reference/key/xml.expected (+27 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/key/xml.expected    2013-06-12 12:10:50 +0900 (eecec45)
@@ -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._key --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._key">mori</FIELD>
+</HIT>
+</RESULTSET>
+</RESULTPAGE>
+</SEGMENT>
+</SEGMENTS>
+
+

  Added: test/command/suite/select/output_columns/scalar/reference/key/xml.test (+11 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/output_columns/scalar/reference/key/xml.test    2013-06-12 12:10:50 +0900 (7549059)
@@ -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._key --output_type xml
-------------- next part --------------
HTML����������������������������...
Download 



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