summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2020-08-02 12:02:07 +0200
committerJens Georg <mail@jensge.org>2020-08-02 12:02:07 +0200
commit07577c69dcf8f02d89e5cc021af189956553cd81 (patch)
treeb4294f07390fcec3fc2de88c932739e29a1f2121 /tests
parent4d2219759b5c1d062b0abd37f1b548bf1cfc2cd5 (diff)
downloadrygel-07577c69dcf8f02d89e5cc021af189956553cd81.tar.gz
test: Add testcase for loading conflicting modules
Modules that are conflicting but one of which is disabled should make the other load
Diffstat (limited to 'tests')
-rw-r--r--tests/plugin-loader/rygel-plugin-loader-test.vala22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/plugin-loader/rygel-plugin-loader-test.vala b/tests/plugin-loader/rygel-plugin-loader-test.vala
index 94133de4..e26740b2 100644
--- a/tests/plugin-loader/rygel-plugin-loader-test.vala
+++ b/tests/plugin-loader/rygel-plugin-loader-test.vala
@@ -58,6 +58,24 @@ void test_plugin_loader_conflict () {
Rygel.MetaConfig.cleanup ();
}
+void test_plugin_loader_conflict_with_disabled () {
+ var config = new TestConfig ();
+ config.enable["Tracker"] = false;
+ config.enable["Tracker3"] = true;
+ config.enable["SomePlugin"] = true;
+ Rygel.MetaConfig.register_configuration (config);
+
+ var loader = new TestPluginLoader("conflicts",
+ {"librygel-tracker3.so", "librygel-no-conflict.so"},
+ {"librygel-tracker.so"});
+ loader.load_modules_sync (null);
+ assert (loader.loaded_plugins.length == 2);
+ assert ("librygel-tracker3.so" in loader.loaded_plugins);
+ assert ("librygel-no-conflict.so" in loader.loaded_plugins);
+
+ Rygel.MetaConfig.cleanup ();
+}
+
void test_plugin_loader_conflict_dynamic_enable () {
var config = new TestConfig ();
@@ -90,7 +108,9 @@ int main (string[] args) {
Test.add_func ("/librygel-core/plugins/load-conflict",
test_plugin_loader_conflict);
+ Test.add_func ("/librygel-core/plugins/load-conflict-with-disabled",
+ test_plugin_loader_conflict_with_disabled);
Test.add_func ("/librygel-core/plugins/load-conflict-enable",
test_plugin_loader_conflict_dynamic_enable);
return Test.run ();
-} \ No newline at end of file
+}