void () { assertEquals("", PathManager.substituteVars("")); assertEquals("abc", PathManager.substituteVars("abc")); assertEquals("a$b$c", PathManager.substituteVars("a$b$c")); assertEquals("/" + TEST_VALUE + "/" + TEST_VALUE + "/", PathManager.substituteVars("/${" + TEST_RPOP + "}/${" + TEST_RPOP + "}/")); String home = System.clearProperty(PathManager.PROPERTY_HOME_PATH); try { assertEquals(PathManager.getHomePath() + "/build.txt", PathManager.substituteVars("${idea.home}/build.txt")); assertEquals(PathManager.getHomePath() + "\\build.txt", PathManager.substituteVars("${idea.home.path}\\build.txt")); assertEquals("/opt/idea/build.txt", PathManager.substituteVars("${idea.home}/build.txt", "/opt/idea")); assertEquals("C:\\opt\\idea\\build.txt", PathManager.substituteVars("${idea.home.path}\\build.txt", "C:\\opt\\idea")); } finally { if (home != null) { System.setProperty(PathManager.PROPERTY_HOME_PATH, home); } } String config = System.clearProperty(PathManager.PROPERTY_CONFIG_PATH); try { assertEquals(PathManager.getConfigPath() + "/opts", PathManager.substituteVars("${idea.config.path}/opts")); } finally { if (config != null) { System.setProperty(PathManager.PROPERTY_CONFIG_PATH, config); } } String system = System.clearProperty(PathManager.PROPERTY_SYSTEM_PATH); try { assertEquals(PathManager.getSystemPath() + "/logs2", PathManager.substituteVars("${idea.system.path}/logs2")); } finally { if (system != null) { System.setProperty(PathManager.PROPERTY_CONFIG_PATH, system); } } assertTrue(FileUtil.pathsEqual(PathManager.getBinPath() + "/../license", PathManager.substituteVars("../license"))); assertEquals("//", PathManager.substituteVars("/${unknown_property_ignore_the_error}/")); }