Пример #1
0
static void
test_extension_gjs_nonexistent (PeasEngine *engine)
{
  PeasPluginInfo *info;

  testing_util_push_log_hook ("*Failed to open *extension-gjs-nonexistent.js*");
  testing_util_push_log_hook ("Error loading plugin 'extension-gjs-nonexistent'");

  info = peas_engine_get_plugin_info (engine, "extension-gjs-nonexistent");

  g_assert (!peas_engine_load_plugin (engine, info));
}
Пример #2
0
PeasEngine *
testing_engine_new (void)
{
  PeasEngine *engine;

  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 '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-module.plugin*");
  testing_util_push_log_hook ("*Error loading *info-missing-name.plugin*");

  /* Must be after requiring typelibs */
  engine = testing_util_engine_new ();

  peas_engine_add_search_path (engine, BUILDDIR "/tests/libpeas/plugins",
                                       SRCDIR   "/tests/libpeas/plugins");

  return engine;
}