From 5ac64b56502a0dfd061b0ce0f7e6cee809565b2d Mon Sep 17 00:00:00 2001 From: Valentin Fondaratov Date: Tue, 12 Jan 2016 19:47:17 +0300 Subject: [PATCH] Fix yaml testdata retrieval (because of failing ruby tests) --- .../testSrc/org/jetbrains/yaml/lexer/YAMLLexerTest.java | 6 ++++-- .../testSrc/org/jetbrains/yaml/parser/YAMLParserTest.java | 4 ++-- .../org/jetbrains/yaml/psi/YAMLScalarContentTest.java | 4 ++-- .../yaml/psiModification/YAMLMappingModificationTest.java | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/plugins/yaml/testSrc/org/jetbrains/yaml/lexer/YAMLLexerTest.java b/plugins/yaml/testSrc/org/jetbrains/yaml/lexer/YAMLLexerTest.java index f55135f823e7..c0dd43f396b2 100644 --- a/plugins/yaml/testSrc/org/jetbrains/yaml/lexer/YAMLLexerTest.java +++ b/plugins/yaml/testSrc/org/jetbrains/yaml/lexer/YAMLLexerTest.java @@ -1,7 +1,8 @@ package org.jetbrains.yaml.lexer; import com.intellij.lexer.Lexer; -import com.intellij.openapi.application.PluginPathManager; +import com.intellij.openapi.application.PathManager; +import com.intellij.openapi.application.ex.PathManagerEx; import com.intellij.testFramework.LexerTestCase; public class YAMLLexerTest extends LexerTestCase { @@ -12,7 +13,8 @@ public class YAMLLexerTest extends LexerTestCase { @Override protected String getDirPath() { - return PluginPathManager.getPluginHomePathRelative("yaml") + "/testSrc/org/jetbrains/yaml/lexer/data"; + return (PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/lexer/data/") + .substring(PathManager.getHomePath().length()); } public void test2docs() { diff --git a/plugins/yaml/testSrc/org/jetbrains/yaml/parser/YAMLParserTest.java b/plugins/yaml/testSrc/org/jetbrains/yaml/parser/YAMLParserTest.java index 6c6973af0244..f38de53a2d6f 100644 --- a/plugins/yaml/testSrc/org/jetbrains/yaml/parser/YAMLParserTest.java +++ b/plugins/yaml/testSrc/org/jetbrains/yaml/parser/YAMLParserTest.java @@ -1,6 +1,6 @@ package org.jetbrains.yaml.parser; -import com.intellij.openapi.application.PluginPathManager; +import com.intellij.openapi.application.ex.PathManagerEx; import com.intellij.testFramework.ParsingTestCase; import org.jetbrains.yaml.YAMLParserDefinition; @@ -16,7 +16,7 @@ public class YAMLParserTest extends ParsingTestCase { } protected String getTestDataPath() { - return PluginPathManager.getPluginHomePath("yaml") + "/testSrc/org/jetbrains/yaml/parser/data/"; + return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/parser/data/"; } public void test2docs() throws Throwable { diff --git a/plugins/yaml/testSrc/org/jetbrains/yaml/psi/YAMLScalarContentTest.java b/plugins/yaml/testSrc/org/jetbrains/yaml/psi/YAMLScalarContentTest.java index ed173e790812..e3f18742529b 100644 --- a/plugins/yaml/testSrc/org/jetbrains/yaml/psi/YAMLScalarContentTest.java +++ b/plugins/yaml/testSrc/org/jetbrains/yaml/psi/YAMLScalarContentTest.java @@ -1,6 +1,6 @@ package org.jetbrains.yaml.psi; -import com.intellij.openapi.application.PluginPathManager; +import com.intellij.openapi.application.ex.PathManagerEx; import com.intellij.psi.PsiElement; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; @@ -9,7 +9,7 @@ import org.jetbrains.yaml.YAMLParserDefinition; public class YAMLScalarContentTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { - return PluginPathManager.getPluginHomePath("yaml") + "/testSrc/org/jetbrains/yaml/psi/data/"; + return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psi/data/"; } @Override diff --git a/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/YAMLMappingModificationTest.java b/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/YAMLMappingModificationTest.java index 497574aa0e00..7f6f663eb59b 100644 --- a/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/YAMLMappingModificationTest.java +++ b/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/YAMLMappingModificationTest.java @@ -1,6 +1,6 @@ package org.jetbrains.yaml.psiModification; -import com.intellij.openapi.application.PluginPathManager; +import com.intellij.openapi.application.ex.PathManagerEx; import com.intellij.openapi.command.WriteCommandAction; import com.intellij.psi.PsiElement; import com.intellij.psi.util.PsiTreeUtil; @@ -14,7 +14,7 @@ import org.jetbrains.yaml.psi.YAMLMapping; public class YAMLMappingModificationTest extends LightPlatformCodeInsightFixtureTestCase { @Override protected String getTestDataPath() { - return PluginPathManager.getPluginHomePath("yaml") + "/testSrc/org/jetbrains/yaml/psiModification/data/"; + return PathManagerEx.getCommunityHomePath() + "/plugins/yaml/testSrc/org/jetbrains/yaml/psiModification/data/"; } @Override