From 79cff11a2cc848e7bfee5ece4c3516f7f64ae88c Mon Sep 17 00:00:00 2001 From: Fredi Kats Date: Fri, 17 May 2024 08:21:31 +0200 Subject: [PATCH] Hack for fixing tests EOL formatting --- .../EditorConfig/EditorConfigFormatterTests.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Sources/Kysect.Configuin.Tests/EditorConfig/EditorConfigFormatterTests.cs b/Sources/Kysect.Configuin.Tests/EditorConfig/EditorConfigFormatterTests.cs index 712d5e4..e64d3c1 100644 --- a/Sources/Kysect.Configuin.Tests/EditorConfig/EditorConfigFormatterTests.cs +++ b/Sources/Kysect.Configuin.Tests/EditorConfig/EditorConfigFormatterTests.cs @@ -79,13 +79,21 @@ public void Format_QualityAndStyleRulesMashed_ReturnOrderedLinesWithHeader() public void FormatAccordingToRuleDefinitions_Sample_ReturnExpectedFormatterDocument() { string input = File.ReadAllText(Path.Combine("Resources", "Editor-config-sample.ini")); - string expected = File.ReadAllText(Path.Combine("Resources", "Editor-config-sample-formatted.ini")); + // TODO: Do smth with this =_= + string expected = File.ReadAllText(Path.Combine("Resources", "Editor-config-sample-formatted.ini")) + .Replace("\r\n", "\n") + .Replace("\n", Environment.NewLine); + ; MsLearnDocumentationRawInfo msLearnDocumentationRawInfo = _repositoryPathReader.Provide(Constants.GetPathToMsDocsRoot()); RoslynRules roslynRules = _msLearnDocumentationParser.Parse(msLearnDocumentationRawInfo); EditorConfigDocument editorConfigDocument = _parser.Parse(input); EditorConfigDocument formattedDocument = _formatter.FormatAccordingToRuleDefinitions(editorConfigDocument, roslynRules); - formattedDocument.ToFullString().Should().Be(expected); + // TODO: Do smth with this =_= + formattedDocument.ToFullString() + .Replace("\r\n", "\n") + .Replace("\n", Environment.NewLine) + .Should().Be(expected); } private void FormatAndCompare(string input, string expected)