[Groonga-commit] groonga/groonga [master] [test][query-expansion] add a test for COLUMN:= case.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 9月 11日 (日) 21:50:28 JST


Kouhei Sutou	2011-09-11 12:50:28 +0000 (Sun, 11 Sep 2011)

  New Revision: 55dec09a3b0bd6a3139059f812fdf48b5ce63db8

  Log:
    [test][query-expansion] add a test for COLUMN:= case.

  Modified files:
    test/unit/core/test-command-select-query-expansion.c

  Modified: test/unit/core/test-command-select-query-expansion.c (+16 -0)
===================================================================
--- test/unit/core/test-command-select-query-expansion.c    2011-09-11 12:45:13 +0000 (817215b)
+++ test/unit/core/test-command-select-query-expansion.c    2011-09-11 12:50:28 +0000 (e15bb53)
@@ -28,6 +28,7 @@ void test_expand_word_with_space(void);
 void test_not_expand_recursively(void);
 void test_expand_OR_quoted(void);
 void test_expand_column_value(void);
+void test_expand_equal(void);
 void test_not_expand_OR(void);
 void test_not_expand_OR_at_the_end(void);
 void test_not_expand_OR_with_leading_space(void);
@@ -114,6 +115,7 @@ setup_data(void)
                       "[\"*\", \"前方一致\"],\n"
                       "[\"(\", \"かっこ\"],\n"
                       "[\")\", \"こっか\"]\n"
+                      "[\"=\", \"\\\"Start rroonga!\\\"\"]\n"
                       "]");
 }
 
@@ -225,6 +227,20 @@ test_expand_column_value(void)
 }
 
 void
+test_expand_equal(void)
+{
+  cut_assert_equal_string(
+      "[[[1],"
+       "[[\"_id\",\"UInt32\"],"
+        "[\"_key\",\"Time\"],"
+        "[\"content\",\"Text\"]],"
+        "[3,1315839600.0,\"Start rroonga!\"]]]",
+    send_command("select Diaries --sortby _id "
+                 "--match_columns content --query 'content:=' "
+                 "--query_expand Synonyms.words"));
+}
+
+void
 test_not_expand_OR(void)
 {
   cut_assert_equal_string(




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