20 #include <glib/gstdio.h>
22 #include "../lib/grn-assertions.h"
32 static gchar *tmp_directory;
33 static const gchar *database_path;
49 g_free(tmp_directory);
53 remove_tmp_directory(
void)
55 cut_remove_path(tmp_directory, NULL);
61 remove_tmp_directory();
62 g_mkdir_with_parents(tmp_directory, 0700);
67 database_path = cut_build_path(tmp_directory,
"database.groonga", NULL);
80 remove_tmp_directory();
90 "[column][create] name can't start with '_' "
91 "and contains only 0-9, A-Z, a-z, #, @, - or _: <_name>",
92 "column_create Users _name COLUMN_SCALAR ShortText");
102 "[column][create] name is missing",
103 "column_create Users --flags COLUMN_SCALAR --type ShortText");
109 GString *command, *long_name;
112 gcut_take_string(long_name);
113 command = gcut_take_new_string(
"");
114 g_string_printf(command,
115 "column_create Users %s COLUMN_SCALAR ShortText",
122 "[column][create] too long column name"
123 ": required name_size(4091) < 4090"
124 ": <Users>.<aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeee",
134 "[column][create] table doesn't exist: <Users>",
135 "column_create Users name COLUMN_SCALAR ShortText");
145 "[column][create] type doesn't exist: <VeryShortText>",
146 "column_create Users name COLUMN_SCALAR VeryShortText");