mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[log] fix graph tests when called from idea ultimate
Use the absolute path to the test data dir, determined by utility method
This commit is contained in:
+5
-3
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.intellij.vcs.log.newgraph;
|
||||
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
|
||||
import java.io.File;
|
||||
@@ -28,13 +29,14 @@ public abstract class AbstractTestWithTextFile {
|
||||
|
||||
protected final String myDirectory;
|
||||
|
||||
@SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
|
||||
protected AbstractTestWithTextFile(String directory) {
|
||||
this.myDirectory = BASE_DIRECTORY + directory;
|
||||
this.myDirectory = PathManagerEx.findFileUnderCommunityHome(BASE_DIRECTORY + directory).getPath();
|
||||
}
|
||||
|
||||
protected void doTest(String testName) throws IOException {
|
||||
String in = FileUtil.loadFile(new File(myDirectory + testName + IN_POSTFIX), true);
|
||||
String out = FileUtil.loadFile(new File(myDirectory + testName + OUT_POSTFIX), true);
|
||||
String in = FileUtil.loadFile(new File(myDirectory, testName + IN_POSTFIX), true);
|
||||
String out = FileUtil.loadFile(new File(myDirectory, testName + OUT_POSTFIX), true);
|
||||
runTest(in, out);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<orderEntry type="module" module-name="util" />
|
||||
<orderEntry type="module" module-name="vcs-log-api" />
|
||||
<orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
|
||||
<orderEntry type="module" module-name="testFramework" scope="TEST" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user