From 7be7c25273deab8123a4325850fd912fa4b490ea Mon Sep 17 00:00:00 2001 From: Jan Krivanek Date: Mon, 21 Nov 2022 13:52:04 +0100 Subject: [PATCH] Upgrade EmptyFiles --- .../{target.txt => nugetconfig/nuget.config} | 0 .../{target.txt => webconfig/web.config} | 0 src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs | 8 -------- .../dotnet-new.Tests/dotnet-new.IntegrationTests.csproj | 2 ++ 4 files changed, 2 insertions(+), 8 deletions(-) rename src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.nugetconfig._.verified/{target.txt => nugetconfig/nuget.config} (100%) rename src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.webconfig._.verified/{target.txt => webconfig/web.config} (100%) diff --git a/src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.nugetconfig._.verified/target.txt b/src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.nugetconfig._.verified/nugetconfig/nuget.config similarity index 100% rename from src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.nugetconfig._.verified/target.txt rename to src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.nugetconfig._.verified/nugetconfig/nuget.config diff --git a/src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.webconfig._.verified/target.txt b/src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.webconfig._.verified/webconfig/web.config similarity index 100% rename from src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.webconfig._.verified/target.txt rename to src/Tests/dotnet-new.Tests/Approvals/AllCommonItemsCreate.webconfig._.verified/webconfig/web.config diff --git a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs index 5c02b68fd119..e1bd2b1f8a00 100644 --- a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs +++ b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs @@ -4,7 +4,6 @@ using System.Diagnostics; using System.Runtime.InteropServices; -using System.Text; using System.Text.RegularExpressions; using Microsoft.DotNet.Cli.Utils; using Microsoft.Extensions.Logging; @@ -64,13 +63,6 @@ public async void AllCommonItemsCreate(string expectedTemplateName, string templ }) ); - // TODO: workaround for '.config' files until https://github.com/VerifyTests/EmptyFiles/pull/110 is merged and flown all the way here - // Untill then a stream comparison is used without scrubbing and normalizing BOM, newlines etc. - VerifierSettings.RegisterFileConverter( - "config", - (stream, _) => new(null, "txt", new StringBuilder(new StreamReader(stream).ReadToEnd())) - ); - // globaljson is appending current sdk version. Due to the 'base' dotnet used to run test this version differs // on dev and CI runs and possibly from the version within test host. Easiest is just to scrub it away if (templateShortName.Equals("globaljson") && args == null) diff --git a/src/Tests/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj b/src/Tests/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj index fedd315ec5c0..9d2581377493 100644 --- a/src/Tests/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj +++ b/src/Tests/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj @@ -16,6 +16,8 @@ + +