void (@Nullable String message, @TestDataFile @NotNull String expectedFilePath, boolean ignoreTrailingSpaces) { bringRealEditorBack(); PostprocessReformattingAspect.getInstance(getProject()).doPostponedFormatting(); if (ignoreTrailingSpaces) { Editor editor = getEditor(); TrailingSpacesStripper.strip(editor.getDocument(), false, true); EditorUtil.fillVirtualSpaceUntilCaret(editor); } PsiDocumentManager.getInstance(getProject()).commitAllDocuments(); String fullPath = getTestDataPath() + expectedFilePath; File ioFile = new File(fullPath); assertTrue(getMessage("Cannot find file " + fullPath, message), ioFile.exists()); String fileText; try { checkCaseSensitiveFS(fullPath, ioFile); fileText = FileUtil.loadFile(ioFile, StandardCharsets.UTF_8); } catch (IOException e) { throw new RuntimeException(e); } checkResultByText(message, StringUtil.convertLineSeparators(fileText), ignoreTrailingSpaces, getTestDataPath() + "/" + expectedFilePath); }