Skip to content

Commit

Permalink
Merge pull request #382 from david-driscoll/NewLinesDifferInTests
Browse files Browse the repository at this point in the history
Ignore new line differences in tests
  • Loading branch information
david-driscoll committed Jan 21, 2016
2 parents b99823c + ed315d1 commit 6ba78df
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/OmniSharp.Roslyn.CSharp.Tests/FixUsingsFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -433,14 +433,11 @@ public void method1()
private async Task AssertBufferContents(string fileContents, string expectedFileContents)
{
var response = await RunFixUsings(fileContents);
if (PlatformServices.Default.Runtime.OperatingSystem == "Windows")
{
Assert.Equal(expectedFileContents, response.Buffer);
}
else
{
Assert.Equal(expectedFileContents, response.Buffer.Replace("\r\n", "\n"));
}
Assert.Equal(FlattenNewLines(expectedFileContents), FlattenNewLines(response.Buffer));
}

private string FlattenNewLines(string input) {
return input.Replace("\r\n", "\n");
}

private async Task AssertUnresolvedReferences(string fileContents, List<QuickFix> expectedUnresolved)
Expand Down

0 comments on commit 6ba78df

Please sign in to comment.