From 410bbdf1f50834aab5fc7bdb9112374b7eb5447c Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Fri, 20 Jul 2018 14:16:41 +0200 Subject: [PATCH] Use coverlet.msbuild Ignore leading spaces and tabs in tests --- .../XmlSchemaClassGenerator.Tests.csproj | 1 + XmlSchemaClassGenerator.Tests/XmlTests.cs | 2 +- appveyor.yml | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj b/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj index 4aad6ad7..0c4ddb16 100644 --- a/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj +++ b/XmlSchemaClassGenerator.Tests/XmlSchemaClassGenerator.Tests.csproj @@ -18,6 +18,7 @@ + diff --git a/XmlSchemaClassGenerator.Tests/XmlTests.cs b/XmlSchemaClassGenerator.Tests/XmlTests.cs index 7a574c6f..8aaba7ca 100644 --- a/XmlSchemaClassGenerator.Tests/XmlTests.cs +++ b/XmlSchemaClassGenerator.Tests/XmlTests.cs @@ -444,7 +444,7 @@ public enum SimpleType private static void CompareOutput(string expected, string actual) { - string Normalize(string input) => Regex.Replace(input, @"\s*\r\n", "\n"); + string Normalize(string input) => Regex.Replace(input, @"[ \t]*\r\n", "\n"); Assert.Equal(Normalize(expected), Normalize(actual)); } } diff --git a/appveyor.yml b/appveyor.yml index 73fbe656..8bc68e13 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,9 +17,7 @@ build_script: - dotnet pack --include-symbols --include-source -c Release xscgen - 7z a -mx=9 XmlSchemaClassGenerator.%APPVEYOR_BUILD_VERSION%.zip ".\XmlSchemaClassGenerator.Console\bin\Release\net45\publish\*" test_script: - - dotnet build -c Debug - - dotnet tool install --global coverlet.console - - coverlet XmlSchemaClassGenerator.Tests\bin\Debug\netcoreapp2.1\XmlSchemaClassGenerator.Tests.dll --target dotnet --targetargs "test XmlSchemaClassGenerator.Tests\XmlSchemaClassGenerator.Tests.csproj --no-build" --format opencover --output ".\coverage.xml" --exclude "[XmlSampleGenerator]*" + - dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="..\coverage.xml" XmlSchemaClassGenerator.Tests\XmlSchemaClassGenerator.Tests.csproj /p:Exclude="[XmlSampleGenerator]*" - pip install codecov - codecov -f "coverage.xml" artifacts: