Skip to content

Commit 79cff11

Browse files
committed
Hack for fixing tests EOL formatting
1 parent 9880b2e commit 79cff11

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Sources/Kysect.Configuin.Tests/EditorConfig/EditorConfigFormatterTests.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,21 @@ public void Format_QualityAndStyleRulesMashed_ReturnOrderedLinesWithHeader()
7979
public void FormatAccordingToRuleDefinitions_Sample_ReturnExpectedFormatterDocument()
8080
{
8181
string input = File.ReadAllText(Path.Combine("Resources", "Editor-config-sample.ini"));
82-
string expected = File.ReadAllText(Path.Combine("Resources", "Editor-config-sample-formatted.ini"));
82+
// TODO: Do smth with this =_=
83+
string expected = File.ReadAllText(Path.Combine("Resources", "Editor-config-sample-formatted.ini"))
84+
.Replace("\r\n", "\n")
85+
.Replace("\n", Environment.NewLine);
86+
;
8387
MsLearnDocumentationRawInfo msLearnDocumentationRawInfo = _repositoryPathReader.Provide(Constants.GetPathToMsDocsRoot());
8488
RoslynRules roslynRules = _msLearnDocumentationParser.Parse(msLearnDocumentationRawInfo);
8589

8690
EditorConfigDocument editorConfigDocument = _parser.Parse(input);
8791
EditorConfigDocument formattedDocument = _formatter.FormatAccordingToRuleDefinitions(editorConfigDocument, roslynRules);
88-
formattedDocument.ToFullString().Should().Be(expected);
92+
// TODO: Do smth with this =_=
93+
formattedDocument.ToFullString()
94+
.Replace("\r\n", "\n")
95+
.Replace("\n", Environment.NewLine)
96+
.Should().Be(expected);
8997
}
9098

9199
private void FormatAndCompare(string input, string expected)

0 commit comments

Comments
 (0)