Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5530578
Adopt TemplateEngine.Authoring.TemplateVerifier in CommonTestTemplates
JanKrivanek Oct 19, 2022
eeb5585
Convert TopLevelProgramSupport test
JanKrivanek Oct 19, 2022
acabaa3
Covert remaining unit tests in CommonTemplatesTests
JanKrivanek Oct 21, 2022
77e5fde
Udpate dotnet-new.IntegrationTests.csproj to use internal feed package
JanKrivanek Oct 21, 2022
939ee0a
Merge remote-tracking branch 'upstream/main' into template-verifier
JanKrivanek Oct 21, 2022
d360677
Fix version mismatches
JanKrivanek Oct 21, 2022
fdc5cb2
Adjust snapshots build exclusion
JanKrivanek Oct 25, 2022
0924684
Merge remote-tracking branch 'upstream/main' into template-verifier
Nov 8, 2022
3b04a69
Update tests
JanKrivanek Nov 8, 2022
1b7a2dd
Inject test environment
JanKrivanek Nov 8, 2022
c0a3f32
Bugfix
JanKrivanek Nov 8, 2022
b5b7e0b
Fix Verify change in handling newlines
JanKrivanek Nov 9, 2022
be0236d
Consolidate integration tests
JanKrivanek Nov 10, 2022
d5959c2
Consolidate tests further
JanKrivanek Nov 10, 2022
ddd24ab
Add directory separators unixification
JanKrivanek Nov 11, 2022
9909a94
Fix issues in consolidated tests
JanKrivanek Nov 11, 2022
66fbd7a
Build fix
JanKrivanek Nov 11, 2022
ddd9510
Test fix
JanKrivanek Nov 11, 2022
fd264d2
Test fix 2
JanKrivanek Nov 11, 2022
3ff162c
Workaround Verify limitation with .config files
JanKrivanek Nov 11, 2022
7be7c25
Upgrade EmptyFiles
JanKrivanek Nov 21, 2022
23b8c80
Reflect PR comments
JanKrivanek Nov 23, 2022
000c28f
Adjust item test to net8 changes
JanKrivanek Nov 23, 2022
12026d3
Testfix - snapshots update
JanKrivanek Nov 23, 2022
ed7874c
Merge remote-tracking branch 'upstream/main' into template-verifier
JanKrivanek Nov 23, 2022
8854670
Update default TFM to net8.0
JanKrivanek Nov 23, 2022
3ccb7ba
Add and modify test scenarios for net8
JanKrivanek Nov 24, 2022
b2a3c66
Remove net6 templates from test matrix for now, to workaround issues …
JanKrivanek Nov 24, 2022
c5fa669
Update test to reflect 5.0 EOL
JanKrivanek Nov 24, 2022
2b1b74a
Readd net6.0 to test matrix, skipping buggy cases
JanKrivanek Nov 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Workaround Verify limitation with .config files
  • Loading branch information
JanKrivanek committed Nov 11, 2022
commit 3ff162c813279ea8dc8a316cb3d7d497b5642f0d
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>

<!-- To customize the asp.net core module uncomment and edit the following section.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>vb-console</RootNamespace>
<RootNamespace>vb_console</RootNamespace>
<TargetFramework>%FRAMEWORK%</TargetFramework>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<RootNamespace>vb-console</RootNamespace>
<RootNamespace>vb_console</RootNamespace>
<TargetFramework>%FRAMEWORK%</TargetFramework>
</PropertyGroup>

Expand Down
9 changes: 8 additions & 1 deletion src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using FluentAssertions;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.Extensions.Logging;
using Microsoft.NET.TestFramework;
Expand Down Expand Up @@ -64,6 +64,13 @@ 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