[Groonga-commit] groonga/groonga [master] [suggest][test] add a suggest test by cooccurrence.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 8月 9日 (火) 12:46:57 JST


Kouhei Sutou	2011-08-09 03:46:57 +0000 (Tue, 09 Aug 2011)

  New Revision: 6a295f9c6f6facdebd64c130613de1c7e498a217

  Log:
    [suggest][test] add a suggest test by cooccurrence.

  Modified files:
    test/unit/story/test-rurema.c

  Modified: test/unit/story/test-rurema.c (+19 -0)
===================================================================
--- test/unit/story/test-rurema.c    2011-08-09 03:46:07 +0000 (0480ebe)
+++ test/unit/story/test-rurema.c    2011-08-09 03:46:57 +0000 (e6819c3)
@@ -23,6 +23,7 @@
 
 void test_complete_cooccurrence(void);
 void test_correct_cooccurrence(void);
+void test_suggest_cooccurrence(void);
 
 static gchar *tmp_directory;
 
@@ -121,3 +122,21 @@ test_correct_coocurrence(void)
         "--threshold 0 "
         "--query 'avg'"));
 }
+
+void
+test_suggest_coocurrence(void)
+{
+  cut_assert_equal_string(
+    "{\"suggest\":"
+     "[[1],"
+      "[[\"_key\",\"ShortText\"],"
+       "[\"_score\",\"Int32\"]],"
+      "[\"csv generate\",1]]}",
+    send_command(
+        "suggest "
+        "--table item_rurema "
+        "--column kana "
+        "--types suggest "
+        "--threshold 0 "
+        "--query 'CSV'"));
+}




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