[glib] Rename G_TEST_DISTED to G_TEST_DIST



commit 8df1bb3486417bc67a5b38fb8fa81f333b18da22
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed May 29 08:49:16 2013 -0400

    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

 gio/tests/appinfo.c         |   22 ++++++++++----------
 gio/tests/contexts.c        |    2 +-
 gio/tests/file.c            |    2 +-
 gio/tests/g-icon.c          |    2 +-
 gio/tests/gdbus-peer.c      |    2 +-
 gio/tests/gschema-compile.c |    2 +-
 gio/tests/gsettings.c       |    8 +++---
 gio/tests/tls-certificate.c |   44 +++++++++++++++++++++---------------------
 glib/gtestutils.c           |   30 +++++++++++++++++++++-------
 glib/gtestutils.h           |    2 +-
 glib/tests/bookmarkfile.c   |    4 +-
 glib/tests/keyfile.c        |    6 ++--
 glib/tests/mappedfile.c     |   10 ++++----
 glib/tests/markup-parse.c   |    4 +-
 14 files changed, 77 insertions(+), 63 deletions(-)
---
diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c
index 25ea8e7..f077a36 100644
--- a/gio/tests/appinfo.c
+++ b/gio/tests/appinfo.c
@@ -15,7 +15,7 @@ test_launch (void)
   const gchar *path;
   gchar *uri;
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
   g_assert (appinfo != NULL);
 
@@ -36,7 +36,7 @@ test_launch (void)
   g_object_unref (file);
 
   l = NULL;
-  uri = g_strconcat ("file://", g_test_get_dir (G_TEST_DISTED), "/appinfo-test.desktop", NULL);
+  uri = g_strconcat ("file://", g_test_get_dir (G_TEST_DIST), "/appinfo-test.desktop", NULL);
   l = g_list_append (l, uri);
   l = g_list_append (l, "file:///etc/group#adm");
 
@@ -59,7 +59,7 @@ test_locale (const char *locale)
   g_setenv ("LANGUAGE", locale, TRUE);
   setlocale (LC_ALL, "");
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
 
   if (g_strcmp0 (locale, "C") == 0)
@@ -104,7 +104,7 @@ test_basic (void)
   GIcon *icon, *icon2;
   const gchar *path;
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
 
   g_assert_cmpstr (g_app_info_get_id (appinfo), ==, "appinfo-test.desktop");
@@ -132,17 +132,17 @@ test_show_in (void)
 
   g_desktop_app_info_set_desktop_env ("GNOME");
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
   g_assert (g_app_info_should_show (appinfo));
   g_object_unref (appinfo);
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test-gnome.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test-gnome.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
   g_assert (g_app_info_should_show (appinfo));
   g_object_unref (appinfo);
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test-notgnome.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test-notgnome.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
   g_assert (!g_app_info_should_show (appinfo));
   g_object_unref (appinfo);
@@ -282,7 +282,7 @@ test_tryexec (void)
   GAppInfo *appinfo;
   const gchar *path;
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test2.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test2.desktop", NULL);
   appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
 
   g_assert (appinfo == NULL);
@@ -403,7 +403,7 @@ test_startup_wm_class (void)
   const char *wm_class;
   const gchar *path;
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   appinfo = g_desktop_app_info_new_from_filename (path);
   wm_class = g_desktop_app_info_get_startup_wm_class (appinfo);
 
@@ -419,7 +419,7 @@ test_supported_types (void)
   const char * const *content_types;
   const gchar *path;
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   appinfo = G_APP_INFO (g_desktop_app_info_new_from_filename (path));
   content_types = g_app_info_get_supported_types (appinfo);
 
@@ -441,7 +441,7 @@ test_from_keyfile (void)
   const gchar *name;
   const gchar *path;
 
-  path = g_test_get_filename (G_TEST_DISTED, "appinfo-test.desktop", NULL);
+  path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
   kf = g_key_file_new ();
   g_key_file_load_from_file (kf, path, G_KEY_FILE_NONE, &error);
   g_assert_no_error (error);
diff --git a/gio/tests/contexts.c b/gio/tests/contexts.c
index f1ed62b..f280495 100644
--- a/gio/tests/contexts.c
+++ b/gio/tests/contexts.c
@@ -188,7 +188,7 @@ main (int argc, char **argv)
 
   g_test_init (&argc, &argv, NULL);
 
-  test_file = g_test_build_filename (G_TEST_DISTED, "contexts.c", NULL);
+  test_file = g_test_build_filename (G_TEST_DIST, "contexts.c", NULL);
   g_file_get_contents (test_file, &test_file_buffer,
                       &test_file_size, &error);
   g_assert_no_error (error);
diff --git a/gio/tests/file.c b/gio/tests/file.c
index c2f2378..86d0058 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -84,7 +84,7 @@ test_type (void)
   GFileType type;
   GError *error = NULL;
 
-  datapath_f = g_file_new_for_path (g_test_get_dir (G_TEST_DISTED));
+  datapath_f = g_file_new_for_path (g_test_get_dir (G_TEST_DIST));
 
   file = g_file_get_child (datapath_f, "g-icon.c");
   type = g_file_query_file_type (file, 0, NULL);
diff --git a/gio/tests/g-icon.c b/gio/tests/g-icon.c
index 2e34d82..ce81518 100644
--- a/gio/tests/g-icon.c
+++ b/gio/tests/g-icon.c
@@ -466,7 +466,7 @@ test_file_icon (void)
   GInputStream *stream;
   gchar *str;
 
-  file = g_file_new_for_path (g_test_get_filename (G_TEST_DISTED, "g-icon.c", NULL));
+  file = g_file_new_for_path (g_test_get_filename (G_TEST_DIST, "g-icon.c", NULL));
   icon = g_file_icon_new (file);
   g_object_unref (file);
 
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index b8f82c5..152c588 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -787,7 +787,7 @@ test_peer (void)
     gsize len;
     gchar *buf2;
     gsize len2;
-    const char *testfile = g_test_get_filename (G_TEST_DISTED, "file.c", NULL);
+    const char *testfile = g_test_get_filename (G_TEST_DIST, "file.c", NULL);
 
     method_call_message = g_dbus_message_new_method_call (NULL, /* name */
                                                           "/org/gtk/GDBus/PeerTestObject",
diff --git a/gio/tests/gschema-compile.c b/gio/tests/gschema-compile.c
index f00fbfa..aa83731 100644
--- a/gio/tests/gschema-compile.c
+++ b/gio/tests/gschema-compile.c
@@ -18,7 +18,7 @@ test_schema_do_compile (gpointer data)
 {
   SchemaTest *test = (SchemaTest *) data;
   gchar *filename = g_strconcat (test->name, ".gschema.xml", NULL);
-  gchar *path = g_test_build_filename (G_TEST_DISTED, "schema-tests", filename, NULL);
+  gchar *path = g_test_build_filename (G_TEST_DIST, "schema-tests", filename, NULL);
   gchar *argv[] = {
     (gchar*)glib_compile_schemas,
     "--strict",
diff --git a/gio/tests/gsettings.c b/gio/tests/gsettings.c
index c2c2f29..922eea2 100644
--- a/gio/tests/gsettings.c
+++ b/gio/tests/gsettings.c
@@ -2257,7 +2257,7 @@ main (int argc, char *argv[])
 
       backend_set = g_getenv ("GSETTINGS_BACKEND") != NULL;
 
-      g_setenv ("XDG_DATA_DIRS", g_test_get_dir (G_TEST_DISTED), TRUE);
+      g_setenv ("XDG_DATA_DIRS", g_test_get_dir (G_TEST_DIST), TRUE);
       g_setenv ("GSETTINGS_SCHEMA_DIR", ".", TRUE);
 
       if (!backend_set)
@@ -2269,7 +2269,7 @@ main (int argc, char *argv[])
         glib_mkenums = "glib-mkenums";
 
       cmdline = g_strdup_printf ("%s --template %s/enums.xml.template %s/testenum.h", glib_mkenums,
-                                g_test_get_dir (G_TEST_DISTED), g_test_get_dir (G_TEST_DISTED));
+                                g_test_get_dir (G_TEST_DIST), g_test_get_dir (G_TEST_DIST));
 
       g_assert (g_spawn_command_line_sync (cmdline, &enums, NULL, &result, NULL));
       g_assert (result == 0);
@@ -2283,7 +2283,7 @@ main (int argc, char *argv[])
       else
         glib_compile_schemas = "glib-compile-schemas";
 
-      cmdline = g_strdup_printf ("%s --targetdir=. --schema-file=org.gtk.test.enums.xml 
--schema-file=%s/org.gtk.test.gschema.xml", glib_compile_schemas, g_test_get_dir (G_TEST_DISTED));
+      cmdline = g_strdup_printf ("%s --targetdir=. --schema-file=org.gtk.test.enums.xml 
--schema-file=%s/org.gtk.test.gschema.xml", glib_compile_schemas, g_test_get_dir (G_TEST_DIST));
       g_assert (g_spawn_command_line_sync (cmdline, NULL, NULL, &result, NULL));
       g_assert (result == 0);
       g_free (cmdline);
@@ -2291,7 +2291,7 @@ main (int argc, char *argv[])
       g_mkdir ("schema-source", 0777);
       g_remove ("schema-source/gschemas.compiled");
 
-      cmdline = g_strdup_printf ("%s --targetdir=schema-source 
--schema-file=%s/org.gtk.schemasourcecheck.gschema.xml", glib_compile_schemas, g_test_get_dir 
(G_TEST_DISTED));
+      cmdline = g_strdup_printf ("%s --targetdir=schema-source 
--schema-file=%s/org.gtk.schemasourcecheck.gschema.xml", glib_compile_schemas, g_test_get_dir (G_TEST_DIST));
       g_assert (g_spawn_command_line_sync (cmdline, NULL, NULL, &result, NULL));
       g_assert (result == 0);
       g_free (cmdline);
diff --git a/gio/tests/tls-certificate.c b/gio/tests/tls-certificate.c
index a3a3333..07303ca 100644
--- a/gio/tests/tls-certificate.c
+++ b/gio/tests/tls-certificate.c
@@ -43,7 +43,7 @@ pem_parser (const Reference *ref)
   GError *error = NULL;
 
   /* Check PEM parsing in certificate, private key order. */
-  g_file_get_contents (g_test_get_filename (G_TEST_DISTED, "cert-tests", "cert-key.pem", NULL), &pem, NULL, 
&error);
+  g_file_get_contents (g_test_get_filename (G_TEST_DIST, "cert-tests", "cert-key.pem", NULL), &pem, NULL, 
&error);
   g_assert_no_error (error);
   g_assert (pem);
 
@@ -70,7 +70,7 @@ pem_parser (const Reference *ref)
   g_free (pem);
 
   /* Check PEM parsing in private key, certificate order */
-  g_file_get_contents (g_test_get_filename (G_TEST_DISTED, "cert-tests", "key-cert.pem", NULL), &pem, NULL, 
&error);
+  g_file_get_contents (g_test_get_filename (G_TEST_DIST, "cert-tests", "key-cert.pem", NULL), &pem, NULL, 
&error);
   g_assert_no_error (error);
   g_assert (pem);
 
@@ -92,7 +92,7 @@ pem_parser (const Reference *ref)
   g_object_unref (cert);
 
   /* Check certificate only PEM */
-  g_file_get_contents (g_test_get_filename (G_TEST_DISTED, "cert-tests", "cert1.pem", NULL), &pem, NULL, 
&error);
+  g_file_get_contents (g_test_get_filename (G_TEST_DIST, "cert-tests", "cert1.pem", NULL), &pem, NULL, 
&error);
   g_assert_no_error (error);
   g_assert (pem);
 
@@ -113,7 +113,7 @@ pem_parser (const Reference *ref)
   g_object_unref (cert);
 
   /* Check error with private key only PEM */
-  g_file_get_contents (g_test_get_filename (G_TEST_DISTED, "cert-tests", "key.pem", NULL), &pem, NULL, 
&error);
+  g_file_get_contents (g_test_get_filename (G_TEST_DIST, "cert-tests", "key.pem", NULL), &pem, NULL, &error);
   g_assert_no_error (error);
   g_assert (pem);
 
@@ -132,7 +132,7 @@ from_file (const Reference *ref)
   const gchar *parsed_key_pem = NULL;
   GError *error = NULL;
 
-  cert = g_tls_certificate_new_from_file (g_test_get_filename (G_TEST_DISTED, "cert-tests", "key-cert.pem", 
NULL),
+  cert = g_tls_certificate_new_from_file (g_test_get_filename (G_TEST_DIST, "cert-tests", "key-cert.pem", 
NULL),
                                           &error);
   g_assert_no_error (error);
   g_assert (cert);
@@ -158,8 +158,8 @@ from_files (const Reference *ref)
   const gchar *parsed_key_pem = NULL;
   GError *error = NULL;
 
-  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DISTED, "cert-tests", "cert1.pem", 
NULL),
-                                           g_test_get_filename (G_TEST_DISTED, "cert-tests", "key.pem", 
NULL),
+  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DIST, "cert-tests", "cert1.pem", 
NULL),
+                                           g_test_get_filename (G_TEST_DIST, "cert-tests", "key.pem", NULL),
                                            &error);
   g_assert_no_error (error);
   g_assert (cert);
@@ -177,16 +177,16 @@ from_files (const Reference *ref)
   g_object_unref (cert);
 
   /* Missing private key */
-  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DISTED, "cert-tests", "cert1.pem", 
NULL),
-                                           g_test_get_filename (G_TEST_DISTED, "cert-tests", "cert2.pem", 
NULL),
+  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DIST, "cert-tests", "cert1.pem", 
NULL),
+                                           g_test_get_filename (G_TEST_DIST, "cert-tests", "cert2.pem", 
NULL),
                                            &error);
   g_assert_error (error, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE);
   g_clear_error (&error);
   g_assert (cert == NULL);
 
   /* Missing certificate */
-  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DISTED, "cert-tests", "key.pem", 
NULL),
-                                           g_test_get_filename (G_TEST_DISTED, "cert-tests", "key.pem", 
NULL),
+  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DIST, "cert-tests", "key.pem", NULL),
+                                           g_test_get_filename (G_TEST_DIST, "cert-tests", "key.pem", NULL),
                                            &error);
   g_assert_error (error, G_TLS_ERROR, G_TLS_ERROR_BAD_CERTIFICATE);
   g_clear_error (&error);
@@ -195,8 +195,8 @@ from_files (const Reference *ref)
   /* Using this method twice with a file containing both private key and
    * certificate as a way to inforce private key presence is a fair use
    */
-  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DISTED, "cert-tests", "key-cert.pem", 
NULL),
-                                           g_test_get_filename (G_TEST_DISTED, "cert-tests", "key-cert.pem", 
NULL),
+  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DIST, "cert-tests", "key-cert.pem", 
NULL),
+                                           g_test_get_filename (G_TEST_DIST, "cert-tests", "key-cert.pem", 
NULL),
                                            &error);
   g_assert_no_error (error);
   g_assert (cert);
@@ -212,8 +212,8 @@ from_files_pkcs8 (const Reference *ref)
   const gchar *parsed_key_pem = NULL;
   GError *error = NULL;
 
-  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DISTED, "cert-tests", "cert1.pem", 
NULL),
-                                           g_test_get_filename (G_TEST_DISTED, "cert-tests", "key8.pem", 
NULL),
+  cert = g_tls_certificate_new_from_files (g_test_get_filename (G_TEST_DIST, "cert-tests", "cert1.pem", 
NULL),
+                                           g_test_get_filename (G_TEST_DIST, "cert-tests", "key8.pem", NULL),
                                            &error);
   g_assert_no_error (error);
   g_assert (cert);
@@ -238,7 +238,7 @@ list_from_file (const Reference *ref)
   GError *error = NULL;
   int i;
 
-  list = g_tls_certificate_list_new_from_file (g_test_get_filename (G_TEST_DISTED, "cert-tests", 
"cert-list.pem", NULL),
+  list = g_tls_certificate_list_new_from_file (g_test_get_filename (G_TEST_DIST, "cert-tests", 
"cert-list.pem", NULL),
                                                &error);
   g_assert_no_error (error);
   g_assert_cmpint (g_list_length (list), ==, 3);
@@ -259,7 +259,7 @@ list_from_file (const Reference *ref)
   g_list_free_full (list, g_object_unref);
 
   /* Empty list is not an error */
-  list = g_tls_certificate_list_new_from_file (g_test_get_filename (G_TEST_DISTED, "cert-tests", 
"nothing.pem", NULL),
+  list = g_tls_certificate_list_new_from_file (g_test_get_filename (G_TEST_DIST, "cert-tests", 
"nothing.pem", NULL),
                                                &error);
   g_assert_no_error (error);
   g_assert_cmpint (g_list_length (list), ==, 0);
@@ -279,27 +279,27 @@ main (int   argc,
   _g_test_tls_backend_get_type ();
 
   /* Load reference PEM */
-  path = g_test_build_filename (G_TEST_DISTED, "cert-tests", "cert1.pem", NULL);
+  path = g_test_build_filename (G_TEST_DIST, "cert-tests", "cert1.pem", NULL);
   g_file_get_contents (path, &ref.cert_pems[0], NULL, &error);
   g_assert_no_error (error);
   g_assert (ref.cert_pems[0]);
   g_free (path);
-  path = g_test_build_filename (G_TEST_DISTED, "cert-tests", "cert2.pem", NULL);
+  path = g_test_build_filename (G_TEST_DIST, "cert-tests", "cert2.pem", NULL);
   g_file_get_contents (path, &ref.cert_pems[1], NULL, &error);
   g_assert_no_error (error);
   g_assert (ref.cert_pems[1]);
   g_free (path);
-  path = g_test_build_filename (G_TEST_DISTED, "cert-tests", "cert3.pem", NULL);
+  path = g_test_build_filename (G_TEST_DIST, "cert-tests", "cert3.pem", NULL);
   g_file_get_contents (path, &ref.cert_pems[2], NULL, &error);
   g_assert_no_error (error);
   g_assert (ref.cert_pems[2]);
   g_free (path);
-  path = g_test_build_filename (G_TEST_DISTED, "cert-tests", "key.pem", NULL);
+  path = g_test_build_filename (G_TEST_DIST, "cert-tests", "key.pem", NULL);
   g_file_get_contents (path, &ref.key_pem, NULL, &error);
   g_assert_no_error (error);
   g_assert (ref.key_pem);
   g_free (path);
-  path = g_test_build_filename (G_TEST_DISTED, "cert-tests", "key8.pem", NULL);
+  path = g_test_build_filename (G_TEST_DIST, "cert-tests", "key8.pem", NULL);
   g_file_get_contents (path, &ref.key8_pem, NULL, &error);
   g_assert_no_error (error);
   g_assert (ref.key8_pem);
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index 80f6931..d6a9652 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -2918,7 +2918,7 @@ g_test_build_filename_va (GTestFileType  file_type,
   const gchar *pathv[16];
   gint num_path_segments;
 
-  if (file_type == G_TEST_DISTED)
+  if (file_type == G_TEST_DIST)
     pathv[0] = test_disted_files_dir;
   else if (file_type == G_TEST_BUILT)
     pathv[0] = test_built_files_dir;
@@ -2941,7 +2941,7 @@ g_test_build_filename_va (GTestFileType  file_type,
 
 /**
  * g_test_build_filename:
- * @file_type: the type of file (built vs. disted)
+ * @file_type: the type of file (built vs. distributed)
  * @first_path: the first segment of the pathname
  * ...: NULL terminated additional path segments
  *
@@ -2951,8 +2951,8 @@ g_test_build_filename_va (GTestFileType  file_type,
  * that the first argument has been replaced with a #GTestFileType
  * argument.
  *
- * The data file should either have been disted with the module
- * containing the test (%G_TEST_DISTED) or built as part of the build
+ * The data file should either have been distributed with the module
+ * containing the test (%G_TEST_DIST) or built as part of the build
  * system of that module (%G_TEST_BUILT).
  *
  * In order for this function to work in srcdir != builddir situations,
@@ -2974,12 +2974,26 @@ g_test_build_filename_va (GTestFileType  file_type,
  **/
 /**
  * GTestFileType:
- * @G_TEST_DISTED: a file that was included in the distribution tarball
+ * @G_TEST_DIST: a file that was included in the distribution tarball
  * @G_TEST_BUILT: a file that was built on the compiling machine
  *
  * The type of file to return the filename for, when used with
  * g_test_build_filename().
  *
+ * These two options correspond rather directly to the 'dist' and
+ * 'built' terminology that automake uses and are explicitly used to
+ * distinguish between the 'srcdir' and 'builddir' being separate.  All
+ * files in your project should either be dist (in the
+ * <literal>DIST_EXTRA</literal> or <literal>dist_schema_DATA</literal>
+ * sense, in which case they will always be in the srcdir) or built (in
+ * the <literal>BUILT_SOURCES</literal> sense, in which case they will
+ * always be in the builddir).
+ *
+ * Note: as a general rule of automake, files that are generated only as
+ * part of the build-from-git process (but then are distributed with the
+ * tarball) always go in srcdir (even if doing a srcdir != builddir
+ * build from git) and are considered as distributed files.
+ *
  * Since: 2.38
  **/
 gchar *
@@ -3001,7 +3015,7 @@ g_test_build_filename (GTestFileType  file_type,
 
 /**
  * g_test_get_dir:
- * @file_type: the type of file (built vs. disted)
+ * @file_type: the type of file (built vs. distributed)
  *
  * Gets the pathname of the directory containing test files of the type
  * specified by @file_type.
@@ -3018,7 +3032,7 @@ g_test_get_dir (GTestFileType file_type)
 {
   g_assert (g_test_initialized ());
 
-  if (file_type == G_TEST_DISTED)
+  if (file_type == G_TEST_DIST)
     return test_disted_files_dir;
   else if (file_type == G_TEST_BUILT)
     return test_built_files_dir;
@@ -3028,7 +3042,7 @@ g_test_get_dir (GTestFileType file_type)
 
 /**
  * g_test_get_filename:
- * @file_type: the type of file (built vs. disted)
+ * @file_type: the type of file (built vs. distributed)
  * @first_path: the first segment of the pathname
  * ...: NULL terminated additional path segments
  *
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index 0b1ba78..2113715 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -374,7 +374,7 @@ void    g_test_assert_expected_messages_internal (const char     *domain,
 
 typedef enum
 {
-  G_TEST_DISTED,
+  G_TEST_DIST,
   G_TEST_BUILT
 } GTestFileType;
 
diff --git a/glib/tests/bookmarkfile.c b/glib/tests/bookmarkfile.c
index 90a4b71..ef4e7dc 100644
--- a/glib/tests/bookmarkfile.c
+++ b/glib/tests/bookmarkfile.c
@@ -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);
     }
diff --git a/glib/tests/keyfile.c b/glib/tests/keyfile.c
index 170e979..2556826 100644
--- a/glib/tests/keyfile.c
+++ b/glib/tests/keyfile.c
@@ -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/";);
diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
index a812ce1..40e0e60 100644
--- a/glib/tests/mappedfile.c
+++ b/glib/tests/mappedfile.c
@@ -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);
diff --git a/glib/tests/markup-parse.c b/glib/tests/markup-parse.c
index 722a049..00e9336 100644
--- a/glib/tests/markup-parse.c
+++ b/glib/tests/markup-parse.c
@@ -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);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]