[gtksourceview] Try harder to make installed tests pass



commit e62cf35d6fa55a15ec8f8c83a5242272190d7d39
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Dec 7 23:30:27 2013 +0100

    Try harder to make installed tests pass

 tests/test-language.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-language.c b/tests/test-language.c
index 9266f9c..932063d 100644
--- a/tests/test-language.c
+++ b/tests/test-language.c
@@ -34,10 +34,18 @@ test_fixture_setup (TestFixture   *fixture,
        }
        else
        {
+               const gchar * const *current;
+               int i;
+
                g_free (dir);
 
-               lang_dirs = g_new0 (gchar *, 2);
-               lang_dirs[0] = g_test_build_filename (G_TEST_DIST, "language-specs", NULL);
+               current = gtk_source_language_manager_get_search_path (fixture->manager);
+               lang_dirs = g_new0 (gchar *, g_strv_length ((gchar **)current) + 2);
+               for (i = 0; current[i] != NULL; i++)
+               {
+                       lang_dirs[i] = g_strdup(current[i]);
+               }
+               lang_dirs[i] = g_test_build_filename (G_TEST_DIST, "language-specs", NULL);
        }
 
        gtk_source_language_manager_set_search_path (fixture->manager, lang_dirs);


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