mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
support java-tests written in groovy
This commit is contained in:
+3
@@ -61,6 +61,9 @@ public abstract class LightFixtureCompletionTestCase extends LightCodeInsightFix
|
||||
assertOrderedEquals(myFixture.getLookupElementStrings(), items);
|
||||
}
|
||||
|
||||
protected void type(String s) {
|
||||
myFixture.type(s);
|
||||
}
|
||||
protected void type(char c) {
|
||||
myFixture.type(c);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
package com.intellij.openapi.application.ex;
|
||||
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.testFramework.TestRunnerUtil;
|
||||
import com.intellij.util.containers.ConcurrentHashMap;
|
||||
import junit.framework.TestCase;
|
||||
@@ -298,7 +299,7 @@ public class PathManagerEx {
|
||||
return result;
|
||||
}
|
||||
|
||||
String targetFile = toSystemDependentName(clazz.getName().replace('.', '/') + ".java");
|
||||
String targetFile = toSystemDependentName(clazz.getName().replace('.', '/'));
|
||||
if (COMMUNITY_TEST_FILES_PARSED_FLAG.compareAndSet(false, true)) {
|
||||
parseCommunityTestFiles();
|
||||
}
|
||||
@@ -370,7 +371,7 @@ public class PathManagerEx {
|
||||
|
||||
private static void process(File file) {
|
||||
String path = file.getAbsolutePath();
|
||||
if (!path.endsWith(".java")) {
|
||||
if (!path.endsWith(".java") && !path.endsWith(".groovy")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -385,7 +386,7 @@ public class PathManagerEx {
|
||||
// Never expect to be here.
|
||||
return;
|
||||
}
|
||||
COMMUNITY_TEST_FILES.add(path.substring(indexToUse));
|
||||
COMMUNITY_TEST_FILES.add(StringUtil.trimEnd(StringUtil.trimEnd(path.substring(indexToUse), ".java"), ".groovy"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user