From 124bd559dec6f86e96b0d5e296f9598d11d51995 Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Thu, 6 May 2021 14:52:46 +0200 Subject: [PATCH] FIR IDE: fix failing AbstractOverrideImplementTest tests on Windows Before the System.lineSeparator() was used for splitting KtFile.text into lines. In IJ all lines has UNIX file endings, so it failed on Windows TC agent --- .../kotlin/idea/codeInsight/AbstractOverrideImplementTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractOverrideImplementTest.kt b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractOverrideImplementTest.kt index e6b31e83045..695aa33732e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractOverrideImplementTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractOverrideImplementTest.kt @@ -204,7 +204,7 @@ abstract class AbstractOverrideImplementTest : KotlinLightCodeI Assert.assertTrue(resultFile.exists()) val errorLines = myFixture.dumpErrorLines() val file = myFixture.file as KtFile - val fileLines = file.text.split(System.lineSeparator()) + val fileLines = file.text.lines() val newTextContent = if (firIdenticalIsPresent) { // Ensure the directive is the first line val fileLinesWithoutFirIdentical = fileLines.filter { it != IgnoreTests.DIRECTIVES.FIR_IDENTICAL }