mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 20:39:40 +07:00
move plugin testData to platform-tests/testData
GitOrigin-RevId: 1e3d2f2a74236538b28212be222b3bdbe62e1456
This commit is contained in:
committed by
intellij-monorepo-bot
parent
89f49f30d9
commit
d05463aba5
@@ -1,9 +1,9 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ide.plugins;
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.extensions.PluginId;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.rules.TempDirectory;
|
||||
import com.intellij.util.lang.UrlClassLoader;
|
||||
import org.junit.Rule;
|
||||
@@ -27,7 +27,7 @@ import static org.junit.Assert.*;
|
||||
*/
|
||||
public class PluginDescriptorTest {
|
||||
private static String getTestDataPath() {
|
||||
return PathManagerEx.getTestDataPath() + "/ide/plugins/pluginDescriptor";
|
||||
return PlatformTestUtil.getPlatformTestDataPath() + "plugins/pluginDescriptor";
|
||||
}
|
||||
|
||||
@Rule public TempDirectory tempDir = new TempDirectory();
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
*/
|
||||
package com.intellij.ide.plugins;
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.extensions.PluginId;
|
||||
import com.intellij.openapi.util.BuildNumber;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.JDOMUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.testFramework.UsefulTestCase;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.Function;
|
||||
@@ -43,7 +43,7 @@ import static org.junit.Assert.*;
|
||||
public class PluginManagerTest {
|
||||
|
||||
private static String getTestDataPath() {
|
||||
return PathManagerEx.getTestDataPath() + "/ide/plugins/sort";
|
||||
return PlatformTestUtil.getPlatformTestDataPath() + "plugins/sort";
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
package com.intellij.util.lang;
|
||||
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.testFramework.PlatformTestUtil;
|
||||
import com.intellij.util.io.zip.JBZipEntry;
|
||||
import com.intellij.util.io.zip.JBZipFile;
|
||||
import com.intellij.util.io.zip.ReorderJarsMain;
|
||||
@@ -49,14 +49,12 @@ public class ReorderJarsTest {
|
||||
}
|
||||
|
||||
private static String getTestDataPath() {
|
||||
String homePath = PathManager.getHomePath().replace(File.separatorChar, '/');
|
||||
if (new File(homePath + "/community/java/java-tests/testData").exists()) return homePath + "/community/java/java-tests/testData";
|
||||
return homePath + "/java/java-tests/testData";
|
||||
return PlatformTestUtil.getPlatformTestDataPath() + "plugins/reorderJars";
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReordering() throws IOException {
|
||||
String path = getTestDataPath() + "/ide/plugins/reorderJars";
|
||||
String path = getTestDataPath();
|
||||
|
||||
try (JBZipFile zipFile1 = new JBZipFile(path + "/annotations.jar")) {
|
||||
List<JBZipEntry> entries = zipFile1.getEntries();
|
||||
@@ -97,7 +95,7 @@ public class ReorderJarsTest {
|
||||
|
||||
@Test
|
||||
public void testPluginXml() throws Exception {
|
||||
String path = getTestDataPath() + "/ide/plugins/reorderJars";
|
||||
String path = getTestDataPath();
|
||||
|
||||
ReorderJarsMain.main(new String[] { path + "/zkmOrder.txt", path, myTempDirectory.getPath() } );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user