[Groonga-commit] groonga/groonga at 56c0e00 [master] test: add a test for "\" (backslash) escape and prefix search

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jul 12 11:20:38 JST 2013


Kouhei Sutou	2013-07-12 11:20:38 +0900 (Fri, 12 Jul 2013)

  New Revision: 56c0e001c7893a1f883bb5b304259858d432fd0d
  https://github.com/groonga/groonga/commit/56c0e001c7893a1f883bb5b304259858d432fd0d

  Message:
    test: add a test for "\" (backslash) escape and prefix search

  Added files:
    test/command/suite/select/query/escape/prefix_search.expected
    test/command/suite/select/query/escape/prefix_search.test

  Added: test/command/suite/select/query/escape/prefix_search.expected (+46 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/escape/prefix_search.expected    2013-07-12 11:20:38 +0900 (6bb735d)
@@ -0,0 +1,46 @@
+table_create Memos TABLE_PAT_KEY ShortText
+[[0,0.0,0.0],true]
+table_create Contents TABLE_PAT_KEY ShortText   --normalizer NormalizerAuto
+[[0,0.0,0.0],true]
+column_create Contents entries_key_index COLUMN_INDEX Memos _key
+[[0,0.0,0.0],true]
+load --table Memos
+[
+{"_key": "(groonga) Start to try!"},
+{"_key": "(mroonga) Installed"},
+{"_key": "(groonga) Upgraded!"}
+]
+[[0,0.0,0.0],3]
+select Memos --match_columns _key --query '\\(groonga\\)*'
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        2
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "_key",
+          "ShortText"
+        ]
+      ],
+      [
+        3,
+        "(groonga) Upgraded!"
+      ],
+      [
+        1,
+        "(groonga) Start to try!"
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/query/escape/prefix_search.test (+14 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/escape/prefix_search.test    2013-07-12 11:20:38 +0900 (b19d5e5)
@@ -0,0 +1,14 @@
+table_create Memos TABLE_PAT_KEY ShortText
+
+table_create Contents TABLE_PAT_KEY ShortText \
+  --normalizer NormalizerAuto
+column_create Contents entries_key_index COLUMN_INDEX Memos _key
+
+load --table Memos
+[
+{"_key": "(groonga) Start to try!"},
+{"_key": "(mroonga) Installed"},
+{"_key": "(groonga) Upgraded!"}
+]
+
+select Memos --match_columns _key --query '\\(groonga\\)*'
-------------- next part --------------
HTML����������������������������...
Download 



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