24 #include "../lib/grn-assertions.h"
29 static gchar *tmp_directory;
45 g_free(tmp_directory);
49 remove_tmp_directory(
void)
51 cut_remove_path(tmp_directory, NULL);
57 const gchar *database_path;
59 remove_tmp_directory();
60 g_mkdir_with_parents(tmp_directory, 0700);
65 database_path = cut_build_path(tmp_directory,
"database.groonga", NULL);
78 remove_tmp_directory();
87 "{\"_key\":\"mori\"}\n"
88 "{\"_key\":\"gunyara-kun\"}\n"
91 cut_assert_equal_string(
93 "[[\"_id\",\"UInt32\"],[\"_key\",\"ShortText\"]],"
95 "[2,\"gunyara-kun\"],"
98 cut_assert_equal_string(
"true",
100 cut_assert_equal_string(
102 "[[\"_id\",\"UInt32\"],[\"_key\",\"ShortText\"]]"
114 "{\"_key\":\"mori\", \"name\":\"Daijiro MORI\"},\n"
115 "{\"_key\":\"gunyara-kun\", \"name\":\"Tasuku SUENAGA\"},\n"
116 "{\"_key\":\"yu\", \"name\":\"Yutaro Shimamura\"}\n"
118 cut_assert_equal_string(
120 "[[\"_id\",\"UInt32\"],"
121 "[\"_key\",\"ShortText\"],"
122 "[\"name\",\"ShortText\"]],"
123 "[1,\"mori\",\"Daijiro MORI\"],"
124 "[2,\"gunyara-kun\",\"Tasuku SUENAGA\"],"
125 "[3,\"yu\",\"Yutaro Shimamura\"]]]",
127 cut_assert_equal_string(
"true",
129 cut_assert_equal_string(
131 "[[\"_id\",\"UInt32\"],"
132 "[\"_key\",\"ShortText\"],"
133 "[\"name\",\"ShortText\"]]"