[libpeas] Remove any noncommon allowed log patterns from libtesting-util



commit e9f45c9c2db9179fdc2f81b3425cd16236dd9f33
Author: Garrett Regier <alias301 gmail com>
Date:   Sat Mar 5 00:55:39 2011 -0800

    Remove any noncommon allowed log patterns from libtesting-util

 tests/libpeas-gtk/plugin-manager-store.c |    2 ++
 tests/libpeas-gtk/plugin-manager.c       |    4 ++++
 tests/libpeas/engine.c                   |    8 ++++++++
 tests/libpeas/testing/testing.c          |   10 ++++++++++
 tests/testing-util/testing-util.c        |   11 +----------
 5 files changed, 25 insertions(+), 10 deletions(-)
---
diff --git a/tests/libpeas-gtk/plugin-manager-store.c b/tests/libpeas-gtk/plugin-manager-store.c
index df7e9de..7dd2877 100644
--- a/tests/libpeas-gtk/plugin-manager-store.c
+++ b/tests/libpeas-gtk/plugin-manager-store.c
@@ -207,6 +207,8 @@ test_gtk_plugin_manager_store_verify_unavailable (TestFixture *fixture)
 {
   PeasPluginInfo *info;
 
+  testing_util_push_log_hook ("Could not find plugin 'does-not-exist' for plugin '*'");
+
   info = peas_engine_get_plugin_info (fixture->engine, "unavailable");
 
   verify_model (fixture, info, TRUE, "libpeas-plugin", FALSE, TRUE);
diff --git a/tests/libpeas-gtk/plugin-manager.c b/tests/libpeas-gtk/plugin-manager.c
index 60b0d5d..63786e5 100644
--- a/tests/libpeas-gtk/plugin-manager.c
+++ b/tests/libpeas-gtk/plugin-manager.c
@@ -172,6 +172,8 @@ test_gtk_plugin_manager_about_button_sensitivity (TestFixture *fixture)
   GtkTreeIter iter;
   PeasPluginInfo *info;
 
+  testing_util_push_log_hook ("Could not find plugin 'does-not-exist' for plugin '*'");
+
   /* Must come first otherwise the first iter may
    * be after a revealed builtin plugin
    */
@@ -198,6 +200,8 @@ test_gtk_plugin_manager_configure_button_sensitivity (TestFixture *fixture)
   GtkTreeIter iter;
   PeasPluginInfo *info;
 
+  testing_util_push_log_hook ("Could not find plugin 'does-not-exist' for plugin '*'");
+
   /* Must come first otherwise the first iter may
    * be after a revealed builtin plugin
    */
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c
index 53c7e97..a31ee8b 100644
--- a/tests/libpeas/engine.c
+++ b/tests/libpeas/engine.c
@@ -151,6 +151,8 @@ test_engine_load_plugin_with_nonexistent_dep (PeasEngine *engine)
   GError *error = NULL;
   PeasPluginInfo *info;
 
+  testing_util_push_log_hook ("Could not find plugin 'does-not-exist' for plugin '*'");
+
   info = peas_engine_get_plugin_info (engine, "nonexistent-dep");
 
   g_assert (!peas_engine_load_plugin (engine, info));
@@ -213,6 +215,8 @@ test_engine_unavailable_plugin (PeasEngine *engine)
 {
   PeasPluginInfo *info;
 
+  testing_util_push_log_hook ("Could not find plugin 'does-not-exist' for plugin '*'");
+
   info = peas_engine_get_plugin_info (engine, "unavailable");
 
   g_assert (!peas_engine_load_plugin (engine, info));
@@ -279,6 +283,8 @@ test_engine_loaded_plugins (PeasEngine *engine)
   gchar **load_plugins;
   gchar **loaded_plugins = NULL;
 
+  testing_util_push_log_hook ("Could not find plugin 'does-not-exist' for plugin '*'");
+
   g_signal_connect_after (engine,
                           "load-plugin",
                           G_CALLBACK (load_plugin_cb),
@@ -363,6 +369,8 @@ test_engine_nonexistent_loader (PeasEngine *engine)
   GError *error = NULL;
   PeasPluginInfo *info;
 
+  testing_util_push_log_hook ("Could not find loader 'does-not-exist' for plugin '*'");
+
   info = peas_engine_get_plugin_info (engine, "nonexistent-loader");
 
   g_assert (!peas_engine_load_plugin (engine, info));
diff --git a/tests/libpeas/testing/testing.c b/tests/libpeas/testing/testing.c
index 93fd284..4a6b5a5 100644
--- a/tests/libpeas/testing/testing.c
+++ b/tests/libpeas/testing/testing.c
@@ -55,6 +55,16 @@ testing_engine_new (void)
 
   testing_init ();
 
+  testing_util_push_log_hook ("*Bad plugin file: *invalid.plugin*");
+  testing_util_push_log_hook ("*Error loading *invalid.plugin*");
+
+  testing_util_push_log_hook ("*Could not find 'IAge' in *info-missing-iage.plugin*");
+  testing_util_push_log_hook ("*Could not find 'Module' in *info-missing-module.plugin*");
+  testing_util_push_log_hook ("*Could not find 'Name' in *info-missing-name.plugin*");
+  testing_util_push_log_hook ("*Error loading *info-missing-iage.plugin*");
+  testing_util_push_log_hook ("*Error loading *info-missing-module.plugin*");
+  testing_util_push_log_hook ("*Error loading *info-missing-name.plugin*");
+
   /* Must be after requiring typelibs */
   engine = testing_util_engine_new ();
 
diff --git a/tests/testing-util/testing-util.c b/tests/testing-util/testing-util.c
index 53523c8..4e0d730 100644
--- a/tests/testing-util/testing-util.c
+++ b/tests/testing-util/testing-util.c
@@ -50,16 +50,7 @@ static GPtrArray *log_hooks = NULL;
  * Don't bother putting errors in here as GLib always aborts on errors.
  */
 static const gchar *allowed_patterns[] = {
-  "*does-not-exist*",
-  "*lib*loader.so*cannot open shared object file: No such file or directory*",
-  "*Could not find 'IAge' in *info-missing-iage.plugin*",
-  "*Could not find 'Module' in *info-missing-module.plugin*",
-  "*Could not find 'Name' in *info-missing-name.plugin*",
-  "*Error loading *info-missing-iage.plugin*",
-  "*Error loading *info-missing-module.plugin*",
-  "*Error loading *info-missing-name.plugin*",
-  "*Bad plugin file: *invalid.plugin*",
-  "*Error loading *invalid.plugin*"
+  "*lib*loader.so*cannot open shared object file: No such file or directory*"
 };
 
 static void



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