[json-glib] parser: Fix all occurances of TESTS_DATA_DIR



commit 141b0a4a2b3b4ef7d9f8769aef5b43f7fb841edd
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Aug 22 12:02:01 2013 +0100

    parser: Fix all occurances of TESTS_DATA_DIR
    
    And use g_test_build_filename().

 json-glib/tests/parser.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/json-glib/tests/parser.c b/json-glib/tests/parser.c
index 0841c0f..c2ed658 100644
--- a/json-glib/tests/parser.c
+++ b/json-glib/tests/parser.c
@@ -655,16 +655,11 @@ test_stream_sync (void)
   GFileInputStream *stream;
   GError *error = NULL;
   JsonNode *root;
-  const char *tests_data_dir;
   char *path;
 
   parser = json_parser_new ();
 
-  tests_data_dir = g_getenv ("JSON_TEST_DATA");
-  if (tests_data_dir == NULL || *tests_data_dir == '\0')
-    tests_data_dir = TESTS_DATA_DIR;
-
-  path = g_build_filename (tests_data_dir, "stream-load.json", NULL);
+  path = g_test_build_filename (G_TEST_DIST, "stream-load.json", NULL);
   file = g_file_new_for_path (path);
   stream = g_file_read (file, NULL, &error);
   g_assert (error == NULL);


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