Skip to content

Commit

Permalink
Upgrade EmptyFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKrivanek committed Nov 21, 2022
1 parent 3ff162c commit b307d23
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/Tests/dotnet-new.Tests/dotnet-new.IntegrationTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<ProjectReference Include="..\Microsoft.NET.TestFramework\Microsoft.NET.TestFramework.csproj" />
<PackageReference Include="Moq" Version="$(MoqPackageVersion)" />
<PackageReference Include="Verify.Xunit" Version="18.1.1" />
<!-- Explicitly update to consume https://github.com/VerifyTests/EmptyFiles/pull/110 -->
<PackageReference Include="EmptyFiles" Version="4.1.0" />
<PackageReference Include="Verify.DiffPlex" Version="1.3.0" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Microsoft.TemplateEngine.TestHelper" Version="$(MicrosoftTemplateEngineTestHelperPackageVersion)" />
Expand Down

0 comments on commit b307d23

Please sign in to comment.