mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use same charset for file and expected data
This commit is contained in:
+6
-5
@@ -1569,9 +1569,9 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
final RangeMarker selEndMarker;
|
||||
final boolean blockSelection;
|
||||
|
||||
static SelectionAndCaretMarkupLoader fromFile(String path, Project project) throws IOException {
|
||||
return new SelectionAndCaretMarkupLoader(StringUtil.convertLineSeparators(FileUtil.loadFile(new File(path))),
|
||||
project);
|
||||
static SelectionAndCaretMarkupLoader fromFile(String path, Project project, String charset) throws IOException {
|
||||
return new SelectionAndCaretMarkupLoader(
|
||||
StringUtil.convertLineSeparators(FileUtil.loadFile(new File(path), charset)), project);
|
||||
}
|
||||
|
||||
static SelectionAndCaretMarkupLoader fromFile(VirtualFile file, Project project) {
|
||||
@@ -1645,8 +1645,9 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
|
||||
final String newText = myFile == originalFile ? fileText.substring(0, caret) + "<caret>" + fileText.substring(caret) : fileText;
|
||||
VfsUtil.saveText(result, newText);*/
|
||||
|
||||
checkResult(expectedFile, stripTrailingSpaces,
|
||||
SelectionAndCaretMarkupLoader.fromFile(path, getProject()), fileText);
|
||||
VirtualFile virtualFile = originalFile.getVirtualFile();
|
||||
String charset = virtualFile == null? null : virtualFile.getCharset().name();
|
||||
checkResult(expectedFile, stripTrailingSpaces, SelectionAndCaretMarkupLoader.fromFile(path, getProject(), charset), fileText);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user