use of com.intellij.application.options.ReplacePathToMacroMap in project intellij-community by JetBrains.
the class PathMacroManagerTest method testProjectUnderUserHome.
@Test
public void testProjectUnderUserHome() {
setUpMocks(USER_HOME + "/IdeaProjects/foo");
final ReplacePathToMacroMap replacePathMap = new ModulePathMacroManager(myPathMacros, myModule).getReplacePathMap();
assertReplacements(replacePathMap, "file:" + USER_HOME + "/IdeaProjects/foo/module -> file:$MODULE_DIR$\n" + "file:/" + USER_HOME + "/IdeaProjects/foo/module -> file:/$MODULE_DIR$\n" + "file://" + USER_HOME + "/IdeaProjects/foo/module -> file://$MODULE_DIR$\n" + "jar:" + USER_HOME + "/IdeaProjects/foo/module -> jar:$MODULE_DIR$\n" + "jar:/" + USER_HOME + "/IdeaProjects/foo/module -> jar:/$MODULE_DIR$\n" + "jar://" + USER_HOME + "/IdeaProjects/foo/module -> jar://$MODULE_DIR$\n" + USER_HOME + "/IdeaProjects/foo/module -> $MODULE_DIR$\n" + APP_HOME + " -> $APPLICATION_HOME_DIR$\n" + "file:" + APP_HOME + " -> file:$APPLICATION_HOME_DIR$\n" + "file:/" + APP_HOME + " -> file:/$APPLICATION_HOME_DIR$\n" + "file://" + APP_HOME + " -> file://$APPLICATION_HOME_DIR$\n" + "jar:" + APP_HOME + " -> jar:$APPLICATION_HOME_DIR$\n" + "jar:/" + APP_HOME + " -> jar:/$APPLICATION_HOME_DIR$\n" + "jar://" + APP_HOME + " -> jar://$APPLICATION_HOME_DIR$\n" + "file:" + USER_HOME + "/IdeaProjects/foo -> file:$MODULE_DIR$/..\n" + "file:/" + USER_HOME + "/IdeaProjects/foo -> file:/$MODULE_DIR$/..\n" + "file://" + USER_HOME + "/IdeaProjects/foo -> file://$MODULE_DIR$/..\n" + "jar:" + USER_HOME + "/IdeaProjects/foo -> jar:$MODULE_DIR$/..\n" + "jar:/" + USER_HOME + "/IdeaProjects/foo -> jar:/$MODULE_DIR$/..\n" + "jar://" + USER_HOME + "/IdeaProjects/foo -> jar://$MODULE_DIR$/..\n" + USER_HOME + "/IdeaProjects/foo -> $MODULE_DIR$/..\n" + "file:" + USER_HOME + "/IdeaProjects -> file:$MODULE_DIR$/../..\n" + "file:/" + USER_HOME + "/IdeaProjects -> file:/$MODULE_DIR$/../..\n" + "file://" + USER_HOME + "/IdeaProjects -> file://$MODULE_DIR$/../..\n" + "jar:" + USER_HOME + "/IdeaProjects -> jar:$MODULE_DIR$/../..\n" + "jar:/" + USER_HOME + "/IdeaProjects -> jar:/$MODULE_DIR$/../..\n" + "jar://" + USER_HOME + "/IdeaProjects -> jar://$MODULE_DIR$/../..\n" + USER_HOME + "/IdeaProjects -> $MODULE_DIR$/../..\n" + USER_HOME + " -> $USER_HOME$\n" + "file:" + USER_HOME + " -> file:$USER_HOME$\n" + "file:/" + USER_HOME + " -> file:/$USER_HOME$\n" + "file://" + USER_HOME + " -> file://$USER_HOME$\n" + "jar:" + USER_HOME + " -> jar:$USER_HOME$\n" + "jar:/" + USER_HOME + " -> jar:/$USER_HOME$\n" + "jar://" + USER_HOME + " -> jar://$USER_HOME$");
}
use of com.intellij.application.options.ReplacePathToMacroMap in project intellij-community by JetBrains.
the class ModuleRootsExternalizationTest method testMacroSubstitute2.
public void testMacroSubstitute2() {
final ReplacePathToMacroMap map = new ReplacePathToMacroMap();
final String path = "jar://C:/idea/lib/forms_rt.jar!/";
map.put("jar://C:/id", "*SUBST*");
final String substituted = map.substitute(path, false);
assertEquals(path, substituted);
}
use of com.intellij.application.options.ReplacePathToMacroMap in project intellij-community by JetBrains.
the class ModuleRootsExternalizationTest method testMacroSubstituteWin.
public void testMacroSubstituteWin() {
final ReplacePathToMacroMap map = new ReplacePathToMacroMap();
final String path = "jar://C:/idea/lib/forms_rt.jar!/";
map.put("jar://C:/", "jar://$MODULE_DIR$/../../");
final String substituted = map.substitute(path, false);
assertEquals("jar://$MODULE_DIR$/../../idea/lib/forms_rt.jar!/", substituted);
}
Aggregations