From b90e8a567ac2b5587f4f6087f94c3c09fe173882 Mon Sep 17 00:00:00 2001 From: Ivan Semenov Date: Wed, 15 Nov 2017 16:00:07 +0300 Subject: [PATCH] Fix GitResetTest --- plugins/git4idea/tests/git4idea/reset/GitResetTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)