From 755b702823d30fbc552e5af51ca9596ade22309e Mon Sep 17 00:00:00 2001 From: Doug Bunting Date: Sat, 3 Sep 2016 13:47:06 -0700 Subject: [PATCH] Correct test failures on Windows with `git config core.autocrlf false` - line endings in checked-out files do not necessarily match `Environment.NewLine` --- .../DirectivesTest.cs | 2 +- .../HtmlGenerationTest.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DirectivesTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DirectivesTest.cs index e6226ab171..ccfd07949b 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DirectivesTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/DirectivesTest.cs @@ -55,7 +55,7 @@ Write says:WriteLiteral says:Write says:98052WriteLiteral says: var body = await Client.GetStringAsync("Directives/ViewReplacesTModelTokenFromInheritedBasePages"); // Assert - Assert.Equal(expected, body.Trim()); + Assert.Equal(expected, body.Trim(), ignoreLineEndingDifferences: true); } } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/HtmlGenerationTest.cs b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/HtmlGenerationTest.cs index 16426ce2d6..4c1102fbe3 100644 --- a/test/Microsoft.AspNetCore.Mvc.FunctionalTests/HtmlGenerationTest.cs +++ b/test/Microsoft.AspNetCore.Mvc.FunctionalTests/HtmlGenerationTest.cs @@ -496,7 +496,7 @@ Products: Music Systems, Televisions (3)"; var response = await Client.GetStringAsync("http://localhost/HtmlGeneration_Home/ItemUsingSharedEditorTemplate"); // Assert - Assert.Equal(expected, response); + Assert.Equal(expected, response, ignoreLineEndingDifferences: true); } [Fact] @@ -510,7 +510,7 @@ Products: Music Systems, Televisions (3)"; var response = await Client.GetStringAsync("http://localhost/HtmlGeneration_Home/ItemUsingModelSpecificEditorTemplate"); // Assert - Assert.Equal(expected, response); + Assert.Equal(expected, response, ignoreLineEndingDifferences: true); } private static HttpRequestMessage RequestWithLocale(string url, string locale)