[Groonga-commit] groonga/groonga [master] Move Cutter tests to grntest tests

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 9 11:06:30 JST 2012


Kouhei Sutou	2012-10-09 11:06:30 +0900 (Tue, 09 Oct 2012)

  New Revision: 5ca4ccb831e86a1c1f3be5803968e7dc3581d10c
  https://github.com/groonga/groonga/commit/5ca4ccb831e86a1c1f3be5803968e7dc3581d10c

  Log:
    Move Cutter tests to grntest tests
    
    Tests for --query_expansion OR at the end is moved.

  Added files:
    test/command/suite/select/query_expansion/scalar/or_at_the_end.expected
    test/command/suite/select/query_expansion/scalar/or_at_the_end.test
    test/command/suite/select/query_expansion/vector/or_at_the_end.expected
    test/command/suite/select/query_expansion/vector/or_at_the_end.test
  Modified files:
    test/unit/core/test-command-select-query-expansion.c

  Added: test/command/suite/select/query_expansion/scalar/or_at_the_end.expected (+29 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query_expansion/scalar/or_at_the_end.expected    2012-10-09 11:06:30 +0900 (2dd84f4)
@@ -0,0 +1,29 @@
+table_create Memos TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Memos content COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
+[[0,0.0,0.0],true]
+column_create Lexicon diary_content COLUMN_INDEX|WITH_POSITION Memos content
+[[0,0.0,0.0],true]
+table_create Synonyms TABLE_PAT_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Synonyms words COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+load --table Memos
+[
+["content"],
+["Start groonga!"],
+["Start mroonga!"],
+["Start rroonga!"],
+["Start Ruby or Python!"]
+]
+[[0,0.0,0.0],4]
+load --table Synonyms
+[
+["_key", "words"],
+["OR", "or"]
+]
+[[0,0.0,0.0],1]
+select --table Memos --query_expansion Synonyms.words   --match_columns content --query 'groonga OR'
+[[0,0.0,0.0],[[[0],[["_id","UInt32"],["content","ShortText"]]]]]

  Added: test/command/suite/select/query_expansion/scalar/or_at_the_end.test (+26 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query_expansion/scalar/or_at_the_end.test    2012-10-09 11:06:30 +0900 (2d37a2a)
@@ -0,0 +1,26 @@
+table_create Memos TABLE_NO_KEY
+column_create Memos content COLUMN_SCALAR ShortText
+
+table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
+column_create Lexicon diary_content COLUMN_INDEX|WITH_POSITION Memos content
+
+table_create Synonyms TABLE_PAT_KEY ShortText
+column_create Synonyms words COLUMN_SCALAR ShortText
+
+load --table Memos
+[
+["content"],
+["Start groonga!"],
+["Start mroonga!"],
+["Start rroonga!"],
+["Start Ruby or Python!"]
+]
+
+load --table Synonyms
+[
+["_key", "words"],
+["OR", "or"]
+]
+
+select --table Memos --query_expansion Synonyms.words \
+  --match_columns content --query 'groonga OR'

  Added: test/command/suite/select/query_expansion/vector/or_at_the_end.expected (+29 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query_expansion/vector/or_at_the_end.expected    2012-10-09 11:06:30 +0900 (23be358)
@@ -0,0 +1,29 @@
+table_create Memos TABLE_NO_KEY
+[[0,0.0,0.0],true]
+column_create Memos content COLUMN_SCALAR ShortText
+[[0,0.0,0.0],true]
+table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
+[[0,0.0,0.0],true]
+column_create Lexicon diary_content COLUMN_INDEX|WITH_POSITION Memos content
+[[0,0.0,0.0],true]
+table_create Synonyms TABLE_PAT_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Synonyms words COLUMN_VECTOR ShortText
+[[0,0.0,0.0],true]
+load --table Memos
+[
+["content"],
+["Start groonga!"],
+["Start mroonga!"],
+["Start rroonga!"],
+["Start Ruby or Python!"]
+]
+[[0,0.0,0.0],4]
+load --table Synonyms
+[
+["_key", "words"],
+["OR", ["or"]]
+]
+[[0,0.0,0.0],1]
+select --table Memos --query_expansion Synonyms.words   --match_columns content --query 'groonga OR'
+[[0,0.0,0.0],[[[0],[["_id","UInt32"],["content","ShortText"]]]]]

  Added: test/command/suite/select/query_expansion/vector/or_at_the_end.test (+26 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query_expansion/vector/or_at_the_end.test    2012-10-09 11:06:30 +0900 (bd153c0)
@@ -0,0 +1,26 @@
+table_create Memos TABLE_NO_KEY
+column_create Memos content COLUMN_SCALAR ShortText
+
+table_create Lexicon TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram
+column_create Lexicon diary_content COLUMN_INDEX|WITH_POSITION Memos content
+
+table_create Synonyms TABLE_PAT_KEY ShortText
+column_create Synonyms words COLUMN_VECTOR ShortText
+
+load --table Memos
+[
+["content"],
+["Start groonga!"],
+["Start mroonga!"],
+["Start rroonga!"],
+["Start Ruby or Python!"]
+]
+
+load --table Synonyms
+[
+["_key", "words"],
+["OR", ["or"]]
+]
+
+select --table Memos --query_expansion Synonyms.words \
+  --match_columns content --query 'groonga OR'

  Modified: test/unit/core/test-command-select-query-expansion.c (+0 -21)
===================================================================
--- test/unit/core/test-command-select-query-expansion.c    2012-10-09 11:03:30 +0900 (2caa41e)
+++ test/unit/core/test-command-select-query-expansion.c    2012-10-09 11:06:30 +0900 (a4b7140)
@@ -186,27 +186,6 @@ data_scalar_and_vector(void)
 }
 
 void
-data_not_expand_OR_at_the_end(void)
-{
-  data_scalar_and_vector();
-}
-
-void
-test_not_expand_OR_at_the_end(gconstpointer data)
-{
-  cut_assert_equal_string(
-    "[[[0],"
-     "[[\"_id\",\"UInt32\"],"
-      "[\"_key\",\"Time\"],"
-      "[\"content\",\"Text\"]]]]",
-    send_command(
-      cut_take_printf("select Diaries --sortby _id "
-                      "--match_columns content --query OR "
-                      "--query_expansion Synonyms.%s",
-                      gcut_data_get_string(data, "column-name"))));
-}
-
-void
 data_not_expand_OR_with_leading_space(void)
 {
   data_scalar_and_vector();
-------------- next part --------------
HTML����������������������������...
下载 



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