[gnome-builder/wip/gtk4-port] test-shortcuts: ensure access to Ide typelib



commit c329e3e5e30000a7e0de12f18aaee096f304c096
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 13 11:03:37 2022 -0700

    test-shortcuts: ensure access to Ide typelib

 src/tests/test-shortcuts.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/tests/test-shortcuts.c b/src/tests/test-shortcuts.c
index e10f3c35d..e917a2e33 100644
--- a/src/tests/test-shortcuts.c
+++ b/src/tests/test-shortcuts.c
@@ -20,6 +20,8 @@
 
 #include "config.h"
 
+#include <girepository.h>
+
 #include <libide-gui.h>
 
 #include "ide-shortcut-bundle-private.h"
@@ -106,7 +108,16 @@ int
 main (int   argc,
       char *argv[])
 {
+  g_autofree char *path = NULL;
+  g_autoptr(GError) error = NULL;
+
   g_assert_nonnull (g_getenv ("G_TEST_SRCDIR"));
+  g_assert_nonnull (g_getenv ("G_TEST_BUILDDIR"));
+
+  path = g_build_filename (g_getenv ("G_TEST_BUILDDIR"), "../", NULL);
+  g_irepository_prepend_search_path (path);
+  g_irepository_require (NULL, "Ide", PACKAGE_ABI_S, 0, &error);
+  g_assert_no_error (error);
 
   gtk_init ();
   g_test_init (&argc, &argv, NULL);


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