diff --git a/spellchecker/testSrc/com/intellij/spellchecker/dictionary/CustomDictionaryTest.java b/spellchecker/testSrc/com/intellij/spellchecker/dictionary/CustomDictionaryTest.java index 0a2aa14617f0..27c38dac376d 100644 --- a/spellchecker/testSrc/com/intellij/spellchecker/dictionary/CustomDictionaryTest.java +++ b/spellchecker/testSrc/com/intellij/spellchecker/dictionary/CustomDictionaryTest.java @@ -11,6 +11,8 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.spellchecker.SpellCheckerManager; import com.intellij.spellchecker.inspection.SpellcheckerInspectionTestCase; import com.intellij.spellchecker.settings.SpellCheckerSettings; +import com.intellij.util.PathUtil; +import org.jetbrains.annotations.NotNull; import java.io.File; import java.io.IOException; @@ -19,6 +21,7 @@ import java.util.ArrayList; import java.util.List; import static com.intellij.openapi.vfs.VfsUtil.copyDirectory; +import static com.intellij.util.PathUtil.toSystemDependentName; public class CustomDictionaryTest extends SpellcheckerInspectionTestCase { private static final String TEST_DIC = "test.dic"; @@ -41,13 +44,13 @@ public class CustomDictionaryTest extends SpellcheckerInspectionTestCase { List oldPaths = settings.getCustomDictionariesPaths(); List testDictionaries = new ArrayList<>(); WriteAction.runAndWait(() -> { - dictDir = getProject().getBaseDir().createChildDirectory(this, getTestName(true)); - copyDirectory(this, myFixture.copyDirectoryToProject(getTestName(true), getTestName(true)), dictDir, null); + dictDir = getProject().getBaseDir().createChildDirectory(this, getDictDirName()); + copyDirectory(this, myFixture.copyDirectoryToProject(getTestName(true), getDictDirName()), dictDir, null); }); VfsUtil.processFilesRecursively(dictDir, file -> { if (FileUtilRt.extensionEquals(file.getPath(), "dic")) { - testDictionaries.add(file.getPath()); + testDictionaries.add(toSystemDependentName(file.getPath())); } return true; }); @@ -56,6 +59,11 @@ public class CustomDictionaryTest extends SpellcheckerInspectionTestCase { spellCheckerManager.fullConfigurationReload(); } + @NotNull + private String getDictDirName() { + return getTestName(true) + "_dict"; + } + @Override protected void tearDown() throws Exception { try {