Rename G_TEST_DISTED to G_TEST_DIST

Since this feature is so utterly automake-centric, we may as well be
using the same terminology as automake itself (ie: although it's
BUILT_SOURCES, it's DIST_EXTRA, not DISTED).

Also add some comments to the enum explaining that these terms are
really corresponding directly to the automake terms.

https://bugzilla.gnome.org/show_bug.cgi?id=549783
This commit is contained in:
Ryan Lortie
2013-05-29 08:49:16 -04:00
parent da478acd3c
commit 8df1bb3486
14 changed files with 77 additions and 63 deletions

View File

@@ -278,14 +278,14 @@ main (int argc, char *argv[])
}
error = NULL;
path = g_test_build_filename (G_TEST_DISTED, "bookmarks", NULL);
path = g_test_build_filename (G_TEST_DIST, "bookmarks", NULL);
dir = g_dir_open (path, 0, &error);
g_free (path);
g_assert_no_error (error);
while ((name = g_dir_read_name (dir)) != NULL)
{
path = g_strdup_printf ("/bookmarks/parse/%s", name);
g_test_add_data_func_full (path, g_test_build_filename (G_TEST_DISTED, "bookmarks", name, NULL),
g_test_add_data_func_full (path, g_test_build_filename (G_TEST_DIST, "bookmarks", name, NULL),
test_file, g_free);
g_free (path);
}

View File

@@ -1340,7 +1340,7 @@ test_load_fail (void)
file = g_key_file_new ();
error = NULL;
g_assert (!g_key_file_load_from_file (file, g_test_get_filename (G_TEST_DISTED, "keyfile.c", NULL), 0, &error));
g_assert (!g_key_file_load_from_file (file, g_test_get_filename (G_TEST_DIST, "keyfile.c", NULL), 0, &error));
g_assert_error (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_PARSE);
g_clear_error (&error);
g_assert (!g_key_file_load_from_file (file, "/nosuchfile", 0, &error));
@@ -1407,7 +1407,7 @@ test_page_boundary (void)
file = g_key_file_new ();
error = NULL;
g_key_file_load_from_file (file, g_test_get_filename (G_TEST_DISTED, "pages.ini", NULL), G_KEY_FILE_NONE, &error);
g_key_file_load_from_file (file, g_test_get_filename (G_TEST_DIST, "pages.ini", NULL), G_KEY_FILE_NONE, &error);
g_assert_no_error (error);
for (i = FIRST_KEY; i <= LAST_KEY; i++)
@@ -1572,7 +1572,7 @@ main (int argc, char *argv[])
g_test_init (&argc, &argv, NULL);
#ifdef G_OS_UNIX
g_setenv ("XDG_DATA_HOME", g_test_get_dir (G_TEST_DISTED), TRUE);
g_setenv ("XDG_DATA_HOME", g_test_get_dir (G_TEST_DIST), TRUE);
#endif
g_test_bug_base ("http://bugzilla.gnome.org/");

View File

@@ -18,7 +18,7 @@ test_basic (void)
GError *error;
error = NULL;
file = g_mapped_file_new (g_test_get_filename (G_TEST_DISTED, "empty", NULL), FALSE, &error);
file = g_mapped_file_new (g_test_get_filename (G_TEST_DIST, "empty", NULL), FALSE, &error);
g_assert_no_error (error);
g_mapped_file_ref (file);
@@ -34,7 +34,7 @@ test_empty (void)
GError *error;
error = NULL;
file = g_mapped_file_new (g_test_get_filename (G_TEST_DISTED, "empty", NULL), FALSE, &error);
file = g_mapped_file_new (g_test_get_filename (G_TEST_DIST, "empty", NULL), FALSE, &error);
g_assert_no_error (error);
g_assert (g_mapped_file_get_contents (file) == NULL);
@@ -83,7 +83,7 @@ test_writable (void)
tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
g_file_get_contents (g_test_get_filename (G_TEST_DISTED, "4096-random-bytes", NULL), &contents, &len, &error);
g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
g_assert_no_error (error);
g_file_set_contents (tmp_copy_path, contents, len, &error);
g_assert_no_error (error);
@@ -127,7 +127,7 @@ test_writable_fd (void)
tmp_copy_path = g_build_filename (g_get_user_runtime_dir (), "glib-test-4096-random-bytes", NULL);
g_file_get_contents (g_test_get_filename (G_TEST_DISTED, "4096-random-bytes", NULL), &contents, &len, &error);
g_file_get_contents (g_test_get_filename (G_TEST_DIST, "4096-random-bytes", NULL), &contents, &len, &error);
g_assert_no_error (error);
g_file_set_contents (tmp_copy_path, contents, len, &error);
g_assert_no_error (error);
@@ -170,7 +170,7 @@ test_gbytes (void)
GError *error;
error = NULL;
file = g_mapped_file_new (g_test_get_filename (G_TEST_DISTED, "empty", NULL), FALSE, &error);
file = g_mapped_file_new (g_test_get_filename (G_TEST_DIST, "empty", NULL), FALSE, &error);
g_assert_no_error (error);
bytes = g_mapped_file_get_bytes (file);

View File

@@ -292,7 +292,7 @@ main (int argc, char *argv[])
}
error = NULL;
path = g_test_build_filename (G_TEST_DISTED, "markups", NULL);
path = g_test_build_filename (G_TEST_DIST, "markups", NULL);
dir = g_dir_open (path, 0, &error);
g_free (path);
g_assert_no_error (error);
@@ -302,7 +302,7 @@ main (int argc, char *argv[])
continue;
path = g_strdup_printf ("/markup/parse/%s", name);
g_test_add_data_func_full (path, g_test_build_filename (G_TEST_DISTED, "markups", name, NULL),
g_test_add_data_func_full (path, g_test_build_filename (G_TEST_DIST, "markups", name, NULL),
test_parse, g_free);
g_free (path);
}