From 826bc36331600de1c8f8e83d971e68994edfd52b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 12 Jun 2020 17:26:44 +0200 Subject: [PATCH] Normalize text before tokenizing Otherwise column numbers are messed up on windows --- .../kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt index 0de187a5cc..f887d88f8b 100644 --- a/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt +++ b/pmd-lang-test/src/main/kotlin/net/sourceforge/pmd/test/BaseTextComparisonTest.kt @@ -36,7 +36,8 @@ abstract class BaseTextComparisonTest { "Source file $sourceFile is missing" } - val actual = transformTextContent(sourceFile.readText()) // UTF-8 + val sourceText = sourceFile.readText(Charsets.UTF_8).normalize() + val actual = transformTextContent(sourceText) if (!expectedFile.exists()) { expectedFile.writeText(actual)