diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libpeas/engine.c | 6 | ||||
-rw-r--r-- | tests/libpeas/plugins/two-deps.plugin | 2 | ||||
-rw-r--r-- | tests/testing-util/testing-util.c | 11 |
3 files changed, 15 insertions, 4 deletions
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c index 26bdc43..0c975f4 100644 --- a/tests/libpeas/engine.c +++ b/tests/libpeas/engine.c @@ -286,9 +286,9 @@ test_engine_plugin_list (PeasEngine *engine) /* Verify that we are finding the furthest dependency in the list */ dependencies = peas_plugin_info_get_dependencies (two_deps_info); - g_assert_cmpint (builtin_index, <, loadable_index); - g_assert_cmpstr (dependencies[0], ==, "builtin"); - g_assert_cmpstr (dependencies[1], ==, "loadable"); + g_assert_cmpint (builtin_index, >, loadable_index); + g_assert_cmpstr (dependencies[0], ==, "loadable"); + g_assert_cmpstr (dependencies[1], ==, "builtin"); /* The two-deps plugin should be ordered after builtin and loadable */ g_assert_cmpint (builtin_index, <, two_deps_index); diff --git a/tests/libpeas/plugins/two-deps.plugin b/tests/libpeas/plugins/two-deps.plugin index 0231c27..b463a82 100644 --- a/tests/libpeas/plugins/two-deps.plugin +++ b/tests/libpeas/plugins/two-deps.plugin @@ -1,6 +1,6 @@ [Plugin] Module=two-deps -Depends=builtin;loadable +Depends=loadable;builtin Name=Two Deps Description=This plugin cannot be loaded and has two deps. Authors=Garrett Regier diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c index 4763e46..1f167a9 100644 --- a/tests/testing-util/testing-util.c +++ b/tests/testing-util/testing-util.c @@ -249,6 +249,17 @@ testing_util_engine_new_full (gboolean nonglobal_loaders) (GWeakNotify) engine_weak_notify, NULL); + /* The plugins that two-deps depends on must be added + * to the engine before it. This is used to verify that + * the engine will order the plugin list correctly. + */ + peas_engine_add_search_path (engine, + BUILDDIR "/tests/plugins/builtin", + SRCDIR "/tests/plugins/builtin"); + peas_engine_add_search_path (engine, + BUILDDIR "/tests/plugins/loadable", + SRCDIR "/tests/plugins/loadable"); + peas_engine_add_search_path (engine, BUILDDIR "/tests/plugins", SRCDIR "/tests/plugins"); |