[libpeas] Add an extension set test for plugins that don't provide an extension



commit 8d6b3502087299585419c0a5e12a3e2da430ae9e
Author: Garrett Regier <alias301 gmail com>
Date:   Sat Mar 5 06:36:15 2011 -0800

    Add an extension set test for plugins that don't provide an extension

 tests/libpeas/extension-set.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/tests/libpeas/extension-set.c b/tests/libpeas/extension-set.c
index 0c88af7..de1c838 100644
--- a/tests/libpeas/extension-set.c
+++ b/tests/libpeas/extension-set.c
@@ -30,10 +30,6 @@
 
 #include "testing/testing.h"
 
-/* TODO:
- *        - Check that extensions sets only contain extensions of their type
- */
-
 typedef struct _TestFixture TestFixture;
 
 struct _TestFixture {
@@ -136,6 +132,10 @@ test_extension_set_activate (PeasEngine *engine)
       g_assert (peas_engine_load_plugin (engine, info));
     }
 
+  /* Load a plugin that does not provide a PeasActivatable */
+  info = peas_engine_get_plugin_info (engine, "extension-c");
+  g_assert (peas_engine_load_plugin (engine, info));
+
   g_assert_cmpint (active, ==, G_N_ELEMENTS (loadable_plugins));
 
   g_object_unref (extension_set);
@@ -159,6 +159,10 @@ test_extension_set_deactivate (PeasEngine *engine)
 
   test_extension_set_activate (engine);
 
+  /* Unload the plugin that does not provide a PeasActivatable */
+  info = peas_engine_get_plugin_info (engine, "extension-c");
+  g_assert (peas_engine_unload_plugin (engine, info));
+
   /* To keep deps in order */
   for (i = G_N_ELEMENTS (loadable_plugins); i > 0; --i)
     {



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