diff --git a/plugins/git4idea/tests/git4idea/reset/GitResetTest.kt b/plugins/git4idea/tests/git4idea/reset/GitResetTest.kt index 4cbe3560964b..83d7d072f5e4 100644 --- a/plugins/git4idea/tests/git4idea/reset/GitResetTest.kt +++ b/plugins/git4idea/tests/git4idea/reset/GitResetTest.kt @@ -34,7 +34,7 @@ class GitResetTest : GitSingleRepoTest() { assertSuccessfulNotification("Reset successful") assertEquals("Branch is on incorrect point", oldHash.asString(), last()) - assertEquals("VirtualFile wasn't refreshed", "initial\n", String(vf.contentsToByteArray())) + assertEquals("VirtualFile wasn't refreshed", "initial" + System.lineSeparator(), String(vf.contentsToByteArray())) } fun `test file status is refreshed on soft reset`() { @@ -49,9 +49,9 @@ class GitResetTest : GitSingleRepoTest() { } private fun prepare(): Pair { - val file = file("f.txt").create().write("initial\n") + val file = file("f.txt").create().write("initial" + System.lineSeparator()) val prevHash = HashImpl.build(file.addCommit("created").hash()) - file.append("more\n") + file.append("more" + System.lineSeparator()) file.addCommit("Added more") val vf = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(file.file)!! return Pair(prevHash, vf)