mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Test fixed (rt.jar on Apple JRE, again)
This commit is contained in:
+5
-4
@@ -19,6 +19,7 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.io.IoTestUtil;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
@@ -65,9 +66,7 @@ public class JarFileSystemTest extends PlatformLangTestCase {
|
||||
VirtualFile metaInf = jarRoot.findChild("META-INF");
|
||||
assertNotNull(metaInf);
|
||||
|
||||
VirtualFile[] children = metaInf.getChildren();
|
||||
assertEquals(1, children.length);
|
||||
assertEquals("MANIFEST.MF", children[0].getName());
|
||||
assertNotNull(metaInf.findChild("MANIFEST.MF"));
|
||||
}
|
||||
|
||||
public void testJarRefresh() throws IOException {
|
||||
@@ -133,12 +132,14 @@ public class JarFileSystemTest extends PlatformLangTestCase {
|
||||
|
||||
private static String getRtJarPath() {
|
||||
String home = System.getProperty("java.home");
|
||||
return home + (SystemInfo.isAppleJvm ? "../Classes/classes.jar" : "/lib/rt.jar");
|
||||
return home + (SystemInfo.isAppleJvm ? "/../Classes/classes.jar" : "/lib/rt.jar");
|
||||
}
|
||||
|
||||
private static VirtualFile findByPath(String path) {
|
||||
VirtualFile file = JarFileSystem.getInstance().findFileByPath(path);
|
||||
assertNotNull(file);
|
||||
int p = path.indexOf(JarFileSystem.JAR_SEPARATOR);
|
||||
path = FileUtil.toCanonicalPath(path.substring(0, p)) + path.substring(p);
|
||||
assertPathsEqual(path, file.getPath());
|
||||
return file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user