summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2017-02-24 00:11:45 +0100
committerCarlos Soriano <csoriano@gnome.org>2017-02-24 14:30:21 +0100
commit54882408402b0942eaff0fafd611fb61b1227d97 (patch)
tree78d9c834cee1cb9010729b0001974d1feebc8cdc /test
parent310c77554f23b07861d664444a5ab726f469d523 (diff)
downloadnautilus-54882408402b0942eaff0fafd611fb61b1227d97.tar.gz
tests: Fix directory extensions points
In 7840b533e2, `nautilus-directory-provider` extension point was added to the code paths used by the tests. When glib is asked for extensions, it assumes the extension point is registered so it segfaults. This patch registers the extension point before the tests are run. https://bugzilla.gnome.org/show_bug.cgi?id=779178
Diffstat (limited to 'test')
-rw-r--r--test/test-nautilus-directory-async.c3
-rw-r--r--test/test-nautilus-search-engine.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/test/test-nautilus-directory-async.c b/test/test-nautilus-directory-async.c
index da86ecab8..804c443cc 100644
--- a/test/test-nautilus-directory-async.c
+++ b/test/test-nautilus-directory-async.c
@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <src/nautilus-directory.h>
+#include <src/nautilus-file-utilities.h>
#include <src/nautilus-search-directory.h>
#include <src/nautilus-file.h>
#include <unistd.h>
@@ -63,6 +64,8 @@ main (int argc,
gtk_init (&argc, &argv);
+ nautilus_ensure_extension_points ();
+
if (argv[1] == NULL)
{
uri = "file:///tmp";
diff --git a/test/test-nautilus-search-engine.c b/test/test-nautilus-search-engine.c
index 2847109f4..2ed8af77e 100644
--- a/test/test-nautilus-search-engine.c
+++ b/test/test-nautilus-search-engine.c
@@ -1,3 +1,4 @@
+#include <src/nautilus-file-utilities.h>
#include <src/nautilus-search-provider.h>
#include <src/nautilus-search-engine.h>
#include <gtk/gtk.h>
@@ -34,6 +35,8 @@ main (int argc,
gtk_init (&argc, &argv);
+ nautilus_ensure_extension_points ();
+
engine = nautilus_search_engine_new ();
g_signal_connect (engine, "hits-added",
G_CALLBACK (hits_added_cb), NULL);