[Groonga-commit] groonga/groonga [master] [test][query-expansion] add a test for quoted "OR".

Back to archive index

null+****@clear***** null+****@clear*****
2011年 9月 11日 (日) 19:35:38 JST


Kouhei Sutou	2011-09-11 10:35:38 +0000 (Sun, 11 Sep 2011)

  New Revision: 1eadf91005acd53d5721a6f97441f7b8886f30c2

  Log:
    [test][query-expansion] add a test for quoted "OR".

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

  Modified: test/unit/core/test-command-select-query-expansion.c (+15 -0)
===================================================================
--- test/unit/core/test-command-select-query-expansion.c    2011-09-11 10:34:50 +0000 (3e1820e)
+++ test/unit/core/test-command-select-query-expansion.c    2011-09-11 10:35:38 +0000 (219b7c4)
@@ -25,6 +25,7 @@
 
 void test_expand(void);
 void test_expand_recursive_not_supported(void);
+void test_expand_OR_quoted(void);
 void test_expand_OR_at_the_end(void);
 void test_expand_OR_with_leading_space(void);
 void test_no_expand(void);
@@ -160,6 +161,20 @@ test_expand_recursive_not_supported(void)
 }
 
 void
+test_expand_OR_quoted(void)
+{
+  cut_assert_equal_string(
+      "[[[1],"
+       "[[\"_id\",\"UInt32\"],"
+        "[\"_key\",\"Time\"],"
+        "[\"content\",\"Text\"]],"
+       "[10,1316444400.0,\"明日は日本語あるいは中国語を勉強します。\"]]]",
+    send_command("select Diaries --sortby _id "
+                 "--match_columns content --query '\"OR\"' "
+                 "--query_expand Synonyms.words"));
+}
+
+void
 test_expand_OR_at_the_end(void)
 {
   cut_assert_equal_string(




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