22 #include <glib/gstdio.h>
24 #include "../lib/grn-assertions.h"
29 static gchar *tmp_directory;
48 g_free(tmp_directory);
52 remove_tmp_directory(
void)
54 cut_remove_path(tmp_directory, NULL);
60 remove_tmp_directory();
61 g_mkdir_with_parents(tmp_directory, 0700);
92 remove_tmp_directory();
100 cut_assert_not_null(database);
108 const gchar last_component[] = G_DIR_SEPARATOR_S
"db";
111 max_path - strlen(last_component));
112 g_mkdir_with_parents(long_path->str, 0700);
113 g_string_append(long_path, last_component);
115 path = g_string_free(long_path,
FALSE);
118 cut_assert_not_null(database);
122 long_path = g_string_new(path);
124 g_string_append(long_path,
"X");
125 path = g_string_free(long_path,
FALSE);