Commit 7b2e7828 authored by Vladimir Krivosheev's avatar Vladimir Krivosheev
Browse files

add file content to assertion "Content equals"

parent 8d837f2f
Showing with 1 addition and 1 deletion
+1 -1
...@@ -200,7 +200,7 @@ fun writeFile(file: Path?, requestor: Any, virtualFile: VirtualFile?, element: E ...@@ -200,7 +200,7 @@ fun writeFile(file: Path?, requestor: Any, virtualFile: VirtualFile?, element: E
if ((LOG.isDebugEnabled || ApplicationManager.getApplication().isUnitTestMode) && !FileUtilRt.isTooLarge(result.length)) { if ((LOG.isDebugEnabled || ApplicationManager.getApplication().isUnitTestMode) && !FileUtilRt.isTooLarge(result.length)) {
val content = element.toBufferExposingByteArray(lineSeparator.separatorString) val content = element.toBufferExposingByteArray(lineSeparator.separatorString)
if (isEqualContent(result, lineSeparator, content, prependXmlProlog)) { if (isEqualContent(result, lineSeparator, content, prependXmlProlog)) {
throw IllegalStateException("Content equals, but it must be handled not on this level: ${result.name}") throw IllegalStateException("Content equals, but it must be handled not on this level: file ${result.name}, content\n${content.toByteArray().toString(StandardCharsets.UTF_8)}")
} }
else if (DEBUG_LOG != null && ApplicationManager.getApplication().isUnitTestMode) { else if (DEBUG_LOG != null && ApplicationManager.getApplication().isUnitTestMode) {
DEBUG_LOG = "${result.path}:\n$content\nOld Content:\n${LoadTextUtil.loadText(result)}" DEBUG_LOG = "${result.path}:\n$content\nOld Content:\n${LoadTextUtil.loadText(result)}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment