mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
plugin manager: test to ensure declared module contract
GitOrigin-RevId: 198f034e5a3d7199bf2ddeb6d505621c4de9d73b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ca0f7587db
commit
e46cd16b38
@@ -0,0 +1,5 @@
|
||||
<idea-plugin>
|
||||
<id>my.plugin</id>
|
||||
<version>0.1.0</version>
|
||||
<module value="foo.bar"/>
|
||||
</idea-plugin>
|
||||
@@ -122,6 +122,16 @@ public class PluginManagerTest {
|
||||
doPluginSortTest("ultimatePlugins", true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testModulePluginIdContract() throws Exception {
|
||||
Path pluginsPath = Paths.get(PlatformTestUtil.getPlatformTestDataPath(), "plugins", "withModules");
|
||||
IdeaPluginDescriptorImpl descriptorBundled = loadDescriptorInTest(pluginsPath, Collections.emptySet(), true);
|
||||
Map<PluginId, IdeaPluginDescriptorImpl> idMap = PluginManagerCore.buildPluginIdMap(Collections.singletonList(descriptorBundled));
|
||||
PluginId moduleId = PluginId.getId("foo.bar");
|
||||
PluginId corePlugin = PluginId.getId("my.plugin");
|
||||
assertEquals(corePlugin, idMap.get(moduleId).getPluginId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIdentifyPreInstalledPlugins() {
|
||||
Path pluginsPath = Paths.get(PlatformTestUtil.getPlatformTestDataPath(), "plugins", "updatedBundled");
|
||||
|
||||
Reference in New Issue
Block a user