null+****@clear*****
null+****@clear*****
2011年 9月 11日 (日) 20:21:03 JST
Kouhei Sutou 2011-09-11 11:21:03 +0000 (Sun, 11 Sep 2011) New Revision: cda5b6f23b25448b0d480e1577dec6f196104ebe Log: [test][query-expansion] add a test for nonexistent expansion word with space. 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 10:50:34 +0000 (911442f) +++ test/unit/core/test-command-select-query-expansion.c 2011-09-11 11:21:03 +0000 (b72ce92) @@ -24,12 +24,14 @@ #include "../lib/grn-assertions.h" void test_expand(void); +void test_expand_word_with_space(void); void test_not_expand_recursively(void); void test_expand_OR_quoted(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); void test_no_expand(void); +void test_no_expand_word_with_space(void); void test_nonexistent_expansion_column(void); static gchar *tmp_directory; @@ -251,6 +253,20 @@ test_no_expand(void) } void +test_no_expand_word_with_space(void) +{ + cut_assert_equal_string( + "[[[1]," + "[[\"_id\",\"UInt32\"]," + "[\"_key\",\"Time\"]," + "[\"content\",\"Text\"]]," + "[9,1316358000.0,\"Learning Ruby and groonga...\"]]]", + send_command("select Diaries " + "--match_columns content --query '\"Ruby and groonga\"' " + "--query_expand Synonyms.words")); +} + +void test_nonexistent_expansion_column(void) { grn_test_assert_send_command_error(