From f220ed2a4eaa9d77ca5cb4e087244e31d8166cac Mon Sep 17 00:00:00 2001 From: Scott Willeke Date: Sun, 29 May 2016 23:08:02 -0700 Subject: [PATCH] fix for appveyor exposed test error --- src/Lessmsi.Tests/CommandLineExtractTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Lessmsi.Tests/CommandLineExtractTests.cs b/src/Lessmsi.Tests/CommandLineExtractTests.cs index 11a1e95..7aaf3a8 100644 --- a/src/Lessmsi.Tests/CommandLineExtractTests.cs +++ b/src/Lessmsi.Tests/CommandLineExtractTests.cs @@ -104,7 +104,10 @@ public void List() string consoleOutput; RunCommandLine("l -t Property TestFiles\\MsiInput\\NUnit-2.5.2.9222.msi", out consoleOutput); - Assert.Equal(expectedOutput, consoleOutput); + // strangely I've seen newlines treated differently either by xunit or different versions of windows. So lets compare these as a list of lines: https://ci.appveyor.com/project/activescott/lessmsi/build/1.0.7/tests + string[] expectedOutputLines = expectedOutput.Split(new string[]{ "\r\n", "\n" }, StringSplitOptions.None); + string[] consoleOutputLines = consoleOutput.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.None); + Assert.Equal(expectedOutputLines, consoleOutputLines); } [Fact]