Minor, expand TESTDATA_DIR with absolute path in CLI tests

To be able to use it correctly inside an xml build file where, if the
path is not absolute, it's treated as relative to the build file path
(which is TMP_DIR in several tests of the subsequent commit)
This commit is contained in:
Alexander Udalov
2018-08-02 15:00:15 +02:00
parent f9ed8e7aaf
commit 19feacb96b
7 changed files with 7 additions and 7 deletions
@@ -185,7 +185,7 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
private static List<String> readArgs(@NotNull String testArgsFilePath, @NotNull String tempDir) {
File testArgsFile = new File(testArgsFilePath);
List<String> lines = FilesKt.readLines(testArgsFile, Charsets.UTF_8);
return CollectionsKt.mapNotNull(lines, arg -> readArg(arg, testArgsFile.getParent(), tempDir));
return CollectionsKt.mapNotNull(lines, arg -> readArg(arg, testArgsFile.getParentFile().getAbsolutePath(), tempDir));
}
private static String readArg(String arg, @NotNull String testDataDir, @NotNull String tempDir) {