20 #include "../lib/grn-assertions.h"
24 static gchar *tmp_directory;
25 static gchar *database_path;
29 static grn_obj *
database, *comments, *content, *expression, *variable, *result;
35 "test-table-select-normalize",
37 database_path = g_build_filename(tmp_directory,
"database.groonga", NULL);
43 g_free(database_path);
44 g_free(tmp_directory);
60 remove_tmp_directory(
void)
62 cut_remove_path(tmp_directory, NULL);
74 "--flags TABLE_PAT_KEY|KEY_NORMALIZE "
75 "--key_type ShortText "
76 "--default_tokenizer TokenBigramSplitSymbol");
78 "COLUMN_INDEX|WITH_POSITION "
87 "'[[\"_key\",\"content\"],"
88 "[\"ボロ\",\"うちのボロTV(アナログ...)はまだ現役です\"],"
89 "[\"ロボ\",\"ロボット 鉄\"]]'"
96 remove_tmp_directory();
97 g_mkdir_with_parents(tmp_directory, 0700);
125 teardown_database(
void)
164 remove_tmp_directory();
168 query(
const gchar *
string)
172 string, strlen(
string),
185 query(
"content:@)は"),
188 gcut_take_new_list_string(
"ボロ", NULL),
197 query(
"content:@...)は"),
200 gcut_take_new_list_string(
"ボロ", NULL),
209 query(
"content:@\"ロボット 鉄\""),
212 gcut_take_new_list_string(
"ロボ", NULL),
221 query(
"content:@ロボット"),
224 gcut_take_new_list_string(
"ロボ", NULL),