From 1cf391e4e71a5410d9c804370e8a10c1085ef633 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 11 Dec 2024 13:53:52 -0800 Subject: [PATCH 01/12] Remove the dotnet core blob feed that's causing test issues --- .../GivenThatWeHaveAPackageReferenceWithAliases.cs | 6 +++--- .../GivenThatWeWantToBuildANetCoreApp.cs | 2 +- .../GivenThatWeWantToGenerateADepsFileForATool.cs | 4 ++-- .../GivenThatWeWantToStoreAProjectWithDependencies.cs | 2 +- .../GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs | 2 +- .../GivenThatWeWantToRestoreDotNetCliToolReference.cs | 2 +- test/Microsoft.NET.TestFramework/NuGetConfigWriter.cs | 1 - 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs index 1d2114cbe0ab..861684cb342e 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeHaveAPackageReferenceWithAliases.cs @@ -39,7 +39,7 @@ public void CanBuildProjectWithPackageReferencesWithConflictingTypes() var testAsset = _testAssetsManager.CreateTestProject(testProject); var packagesPaths = packageReferences.Select(e => Path.GetDirectoryName(e.NupkgPath)); - List sources = new() { NuGetConfigWriter.DotnetCoreBlobFeed }; + List sources = new(); sources.AddRange(packagesPaths); NuGetConfigWriter.Write(testAsset.TestRoot, sources); @@ -85,7 +85,7 @@ public void CanBuildProjectWithMultiplePackageReferencesWithAliases() testProject.SourceFiles[$"{testProject.Name}.cs"] = ClassLibAandBUsage; var testAsset = _testAssetsManager.CreateTestProject(testProject); - List sources = new() { NuGetConfigWriter.DotnetCoreBlobFeed, Path.GetDirectoryName(packageReferenceA.NupkgPath), Path.GetDirectoryName(packageReferenceB.NupkgPath) }; + List sources = new() { Path.GetDirectoryName(packageReferenceA.NupkgPath), Path.GetDirectoryName(packageReferenceB.NupkgPath) }; NuGetConfigWriter.Write(testAsset.TestRoot, sources); var buildCommand = new BuildCommand(testAsset) @@ -122,7 +122,7 @@ public void CanBuildProjectWithAPackageReferenceWithMultipleAliases() testProject.SourceFiles[$"{testProject.Name}.cs"] = ClassLibAandBUsage; var testAsset = _testAssetsManager.CreateTestProject(testProject); - List sources = new() { NuGetConfigWriter.DotnetCoreBlobFeed, Path.GetDirectoryName(packageReferenceA.NupkgPath) }; + List sources = new() { Path.GetDirectoryName(packageReferenceA.NupkgPath) }; NuGetConfigWriter.Write(testAsset.TestRoot, sources); var buildCommand = new BuildCommand(testAsset) diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs index 4201fa3af6d3..749ded3845d6 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs @@ -133,7 +133,7 @@ private void It_targets_the_right_framework( var testAsset = _testAssetsManager.CreateTestProject(testProject, testIdentifier); - NuGetConfigWriter.Write(testAsset.TestRoot, NuGetConfigWriter.DotnetCoreBlobFeed); + NuGetConfigWriter.Write(testAsset.TestRoot); var buildCommand = new BuildCommand(testAsset); diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs index 3a52991ba440..a14abd1a92b5 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToGenerateADepsFileForATool.cs @@ -86,7 +86,7 @@ private CommandResult GenerateDepsAndRunTool(TestProject toolProject, [CallerMem var toolProjectInstance = _testAssetsManager.CreateTestProject(toolProject, callingMethod, identifier: toolProject.Name); - NuGetConfigWriter.Write(toolProjectInstance.TestRoot, NuGetConfigWriter.DotnetCoreBlobFeed); + NuGetConfigWriter.Write(toolProjectInstance.TestRoot); // Workaround https://github.com/dotnet/cli/issues/9701 var useBundledNETCoreAppPackage = "/p:UseBundledNETCoreAppPackageVersionAsDefaultNetCorePatchVersion=true"; @@ -118,7 +118,7 @@ private CommandResult GenerateDepsAndRunTool(TestProject toolProject, [CallerMem new XAttribute("Version", "1.0.0"))); }); - List sources = new() { NuGetConfigWriter.DotnetCoreBlobFeed }; + List sources = new(); sources.Add(nupkgPath); NuGetConfigWriter.Write(toolReferencerInstance.TestRoot, sources); diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs index 1925af0e32bb..2948cd66c398 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs @@ -133,7 +133,7 @@ public void store_nativeonlyassets() var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "outdir"); var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w"); - NuGetConfigWriter.Write(simpleDependenciesAsset.TestRoot, NuGetConfigWriter.DotnetCoreBlobFeed); + NuGetConfigWriter.Write(simpleDependenciesAsset.TestRoot); storeCommand .Execute($"/p:RuntimeIdentifier={_runtimeRid}", $"/p:TargetFramework={_tfm}", $"/p:ComposeWorkingDir={WorkingDir}", $"/p:ComposeDir={OutputFolder}", $"/p:DoNotDecorateComposeDir=true") diff --git a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs index 9b21f3bbd9f2..1d771c714cb5 100644 --- a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs +++ b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToIgnoreObsoleteDotNetCliToolPackages.cs @@ -34,7 +34,7 @@ public void It_issues_warning_and_skips_restore_for_obsolete_DotNetCliToolRefere new XAttribute("Include", obsoletePackageId))); }); - NuGetConfigWriter.Write(toolProjectInstance.TestRoot, NuGetConfigWriter.DotnetCoreBlobFeed); + NuGetConfigWriter.Write(toolProjectInstance.TestRoot); RestoreCommand restoreCommand = toolProjectInstance.GetRestoreCommand(Log, toolProject.Name); restoreCommand.Execute("/v:n").Should() diff --git a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToRestoreDotNetCliToolReference.cs b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToRestoreDotNetCliToolReference.cs index d702b78c096f..ca58a5f9b6b1 100644 --- a/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToRestoreDotNetCliToolReference.cs +++ b/test/Microsoft.NET.Restore.Tests/GivenThatWeWantToRestoreDotNetCliToolReference.cs @@ -50,7 +50,7 @@ public void It_can_restore_with_netcoreapp2_2() DeleteFolder(Path.Combine(TestContext.Current.NuGetCachePath, toolProject.Name.ToLowerInvariant())); DeleteFolder(Path.Combine(TestContext.Current.NuGetCachePath, ".tools", toolProject.Name.ToLowerInvariant())); - NuGetConfigWriter.Write(toolReferenceProjectInstance.TestRoot, NuGetConfigWriter.DotnetCoreBlobFeed, nupkgPath); + NuGetConfigWriter.Write(toolReferenceProjectInstance.TestRoot, nupkgPath); RestoreCommand restoreCommand = toolReferenceProjectInstance.GetRestoreCommand(log: Log, relativePath: toolReferenceProject.Name); diff --git a/test/Microsoft.NET.TestFramework/NuGetConfigWriter.cs b/test/Microsoft.NET.TestFramework/NuGetConfigWriter.cs index bf27fe23956f..6e90aa618904 100644 --- a/test/Microsoft.NET.TestFramework/NuGetConfigWriter.cs +++ b/test/Microsoft.NET.TestFramework/NuGetConfigWriter.cs @@ -5,7 +5,6 @@ namespace Microsoft.NET.TestFramework { public static class NuGetConfigWriter { - public static readonly string DotnetCoreBlobFeed = "https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json"; public static readonly string AspNetCoreDevFeed = "https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json"; public static void Write(string folder, params string[] nugetSources) From 89cd638cf53dcb5dc0261233800bf3931b9c6591 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 12 Dec 2024 14:58:49 -0800 Subject: [PATCH 02/12] Remove the unmanaged store test as it requires a package we no longer have easy access to --- ...atWeWantToStoreAProjectWithDependencies.cs | 31 ------------------- .../UnmanagedStore/UnmanagedStore.csproj | 7 ----- 2 files changed, 38 deletions(-) delete mode 100644 test/TestAssets/TestProjects/UnmanagedStore/UnmanagedStore.csproj diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs index 2948cd66c398..9f75c4be174d 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToStoreAProjectWithDependencies.cs @@ -121,37 +121,6 @@ public void compose_dependencies_noopt() storeDirectory.Should().OnlyHaveFiles(files_on_disk); } - [Fact(Skip = "https://github.com/dotnet/sdk/issues/45417")] - public void store_nativeonlyassets() - { - TestAsset simpleDependenciesAsset = _testAssetsManager - .CopyTestAsset("UnmanagedStore") - .WithSource(); - - var storeCommand = new ComposeStoreCommand(Log, simpleDependenciesAsset.TestRoot); - - var OutputFolder = Path.Combine(simpleDependenciesAsset.TestRoot, "outdir"); - var WorkingDir = Path.Combine(simpleDependenciesAsset.TestRoot, "w"); - - NuGetConfigWriter.Write(simpleDependenciesAsset.TestRoot); - - storeCommand - .Execute($"/p:RuntimeIdentifier={_runtimeRid}", $"/p:TargetFramework={_tfm}", $"/p:ComposeWorkingDir={WorkingDir}", $"/p:ComposeDir={OutputFolder}", $"/p:DoNotDecorateComposeDir=true") - .Should() - .Pass(); - - DirectoryInfo storeDirectory = new(OutputFolder); - - List files_on_disk = new() - { - "artifact.xml", - $"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/{_libPrefix}coredistools{FileConstants.DynamicLibSuffix}", - $"runtime.{_runtimeRid}.microsoft.netcore.coredistools/1.0.1-prerelease-00001/runtimes/{_runtimeRid}/native/coredistools.h" - }; - - storeDirectory.Should().OnlyHaveFiles(files_on_disk); - } - [Fact] public void compose_multifile() { diff --git a/test/TestAssets/TestProjects/UnmanagedStore/UnmanagedStore.csproj b/test/TestAssets/TestProjects/UnmanagedStore/UnmanagedStore.csproj deleted file mode 100644 index 97c34181d373..000000000000 --- a/test/TestAssets/TestProjects/UnmanagedStore/UnmanagedStore.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - From 70a4d103bcbc45e8ea9d4f2d329bbb4c676764ad Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 18 Dec 2024 11:44:30 -0800 Subject: [PATCH 03/12] reenable some skipped tests. --- .../GivenThatWeWantToBuildANetCoreApp.cs | 2 +- test/dotnet-new.Tests/DotnetNewListTests.Approval.cs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs index 749ded3845d6..36e9637febc8 100644 --- a/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs +++ b/test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreApp.cs @@ -48,7 +48,7 @@ public void It_targets_the_right_shared_framework(string targetFramework, string } // Test behavior when implicit version differs for framework-dependent and self-contained apps - [Theory(Skip = "https://github.com/dotnet/sdk/issues/45417")] + [Theory] [InlineData("netcoreapp1.0", false, true, "1.0.5")] [InlineData("netcoreapp1.0", true, true, "1.0.16")] [InlineData("netcoreapp1.0", false, false, "1.0.5")] diff --git a/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs b/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs index 985d1b07932b..0c1995a11340 100644 --- a/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs +++ b/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs @@ -7,8 +7,7 @@ namespace Microsoft.DotNet.Cli.New.IntegrationTests { public partial class DotnetNewListTests { -#pragma warning disable xUnit1004 // Test methods should not be skipped - [Theory(Skip = "https://github.com/dotnet/sdk/issues/45406")] + [Theory] [InlineData("-l")] [InlineData("--list")] public Task BasicTest_WhenLegacyCommandIsUsed(string commandName) @@ -28,7 +27,7 @@ public Task BasicTest_WhenLegacyCommandIsUsed(string commandName) .DisableRequireUniquePrefix(); } - [Fact(Skip = "https://github.com/dotnet/sdk/issues/45406")] + [Fact] public Task BasicTest_WhenListCommandIsUsed() { CommandResult commandResult = new DotnetNewCommand(_log, "list") @@ -42,7 +41,6 @@ public Task BasicTest_WhenListCommandIsUsed() return Verify(commandResult.StdOut).UniqueForOSPlatform(); } -#pragma warning restore xUnit1004 [Fact] public Task Constraints_CanShowMessageIfTemplateGroupIsRestricted() From e9a4696e96d3334a000629c74d28aedbdc0adf7d Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 18 Dec 2024 16:45:36 -0800 Subject: [PATCH 04/12] Adding a scrubber to remove most of the list output as a direct comparison will fail far more often than is maintainable. --- ...acyCommandIsUsed_common.Linux.verified.txt | 65 +++++++------------ ...egacyCommandIsUsed_common.OSX.verified.txt | 65 +++++++------------ ...yCommandIsUsed_common.Windows.verified.txt | 65 +++++++------------ .../DotnetNewListTests.Approval.cs | 46 ++++++++++++- 4 files changed, 113 insertions(+), 128 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt index 1b8aada399de..b71785b20c16 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt @@ -1,46 +1,27 @@ Warning: use of 'dotnet new --list' is deprecated. Use 'dotnet new list' instead. For more information, run: dotnet new list -h - These templates matched your input: - -Template Name Short Name Language Tags --------------------------------------------- -------------------------- ---------- ---------------------------------- -API Controller apicontroller [C#] Web/ASP.NET -ASP.NET Core Empty web [C#],F# Web/Empty -ASP.NET Core gRPC Service grpc [C#] Web/gRPC/API/Service -ASP.NET Core Web API webapi [C#],F# Web/Web API/API/Service/WebAPI -ASP.NET Core Web API (native AOT) webapiaot [C#] Web/Web API/API/Service -ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC -ASP.NET Core Web App (Razor Pages) webapp,razor [C#] Web/MVC/Razor Pages -Blazor Server App blazorserver [C#] Web/Blazor -Blazor Web App blazor [C#] Web/Blazor/WebAssembly -Blazor WebAssembly Standalone App blazorwasm [C#] Web/Blazor/WebAssembly/PWA -Class Library classlib [C#],F#,VB Common/Library -Console App console [C#],F#,VB Common/Console -dotnet gitignore file gitignore,.gitignore Config -Dotnet local tool manifest file tool-manifest Config -EditorConfig file editorconfig,.editorconfig Config -global.json file globaljson,global.json Config -MSBuild Directory.Build.props file buildprops MSBuild/props -MSBuild Directory.Build.targets file buildtargets MSBuild/props -MSBuild Directory.Packages.props file packagesprops MSBuild/packages/props/CPM -MSTest Playwright Test Project mstest-playwright [C#] Test/MSTest/Playwright/Desktop/Web -MSTest Test Class mstest-class [C#],F#,VB Test/MSTest -MSTest Test Project mstest [C#],F#,VB Test/MSTest/Desktop/Web -MVC Controller mvccontroller [C#] Web/ASP.NET -MVC ViewImports viewimports [C#] Web/ASP.NET -MVC ViewStart viewstart [C#] Web/ASP.NET -NuGet Config nugetconfig,nuget.config Config -NUnit 3 Test Item nunit-test [C#],F#,VB Test/NUnit -NUnit 3 Test Project nunit [C#],F#,VB Test/NUnit/Desktop/Web -NUnit Playwright Test Project nunit-playwright [C#] Test/NUnit/Playwright/Desktop/Web -Protocol Buffer File proto Web/gRPC -Razor Class Library razorclasslib [C#] Web/Razor/Library -Razor Component razorcomponent [C#] Web/ASP.NET -Razor Page page [C#] Web/ASP.NET -Razor View view [C#] Web/ASP.NET -Solution File sln,solution Solution -Web Config webconfig Config -Worker Service worker [C#],F# Common/Worker/Web -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +Template Name Short Name Language Tags +API +ASP.NET +Blazor +Class +Console +dotnet +Dotnet +EditorConfig +global.json +MSBuild +MSTest +MVC +NuGet +NUnit +Protocol +Razor +Solution +Web +Windows +Worker +WPF +xUnit diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt index d591abac471b..b71785b20c16 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt @@ -1,46 +1,27 @@ Warning: use of 'dotnet new --list' is deprecated. Use 'dotnet new list' instead. For more information, run: dotnet new list -h - These templates matched your input: - -Template Name Short Name Language Tags --------------------------------------------- -------------------------- ---------- ------------------------------ -API Controller apicontroller [C#] Web/ASP.NET -ASP.NET Core Empty web [C#],F# Web/Empty -ASP.NET Core gRPC Service grpc [C#] Web/gRPC/API/Service -ASP.NET Core Web API webapi [C#],F# Web/Web API/API/Service/WebAPI -ASP.NET Core Web API (native AOT) webapiaot [C#] Web/Web API/API/Service -ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC -ASP.NET Core Web App (Razor Pages) webapp,razor [C#] Web/MVC/Razor Pages -Blazor Server App blazorserver [C#] Web/Blazor -Blazor Web App blazor [C#] Web/Blazor/WebAssembly -Blazor WebAssembly Standalone App blazorwasm [C#] Web/Blazor/WebAssembly/PWA -Class Library classlib [C#],F#,VB Common/Library -Console App console [C#],F#,VB Common/Console -dotnet gitignore file gitignore,.gitignore Config -Dotnet local tool manifest file tool-manifest Config -EditorConfig file editorconfig,.editorconfig Config -global.json file globaljson,global.json Config -MSBuild Directory.Build.props file buildprops MSBuild/props -MSBuild Directory.Build.targets file buildtargets MSBuild/props -MSBuild Directory.Packages.props file packagesprops MSBuild/packages/props/CPM -MSTest Playwright Test Project mstest-playwright [C#] Test/MSTest/Playwright -MSTest Test Class mstest-class [C#],F#,VB Test/MSTest -MSTest Test Project mstest [C#],F#,VB Test/MSTest -MVC Controller mvccontroller [C#] Web/ASP.NET -MVC ViewImports viewimports [C#] Web/ASP.NET -MVC ViewStart viewstart [C#] Web/ASP.NET -NuGet Config nugetconfig,nuget.config Config -NUnit 3 Test Item nunit-test [C#],F#,VB Test/NUnit -NUnit 3 Test Project nunit [C#],F#,VB Test/NUnit -NUnit Playwright Test Project nunit-playwright [C#] Test/NUnit/Playwright -Protocol Buffer File proto Web/gRPC -Razor Class Library razorclasslib [C#] Web/Razor/Library -Razor Component razorcomponent [C#] Web/ASP.NET -Razor Page page [C#] Web/ASP.NET -Razor View view [C#] Web/ASP.NET -Solution File sln,solution Solution -Web Config webconfig Config -Worker Service worker [C#],F# Common/Worker/Web -xUnit Test Project xunit [C#],F#,VB Test/xUnit \ No newline at end of file +Template Name Short Name Language Tags +API +ASP.NET +Blazor +Class +Console +dotnet +Dotnet +EditorConfig +global.json +MSBuild +MSTest +MVC +NuGet +NUnit +Protocol +Razor +Solution +Web +Windows +Worker +WPF +xUnit diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt index 1b8aada399de..b71785b20c16 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt @@ -1,46 +1,27 @@ Warning: use of 'dotnet new --list' is deprecated. Use 'dotnet new list' instead. For more information, run: dotnet new list -h - These templates matched your input: - -Template Name Short Name Language Tags --------------------------------------------- -------------------------- ---------- ---------------------------------- -API Controller apicontroller [C#] Web/ASP.NET -ASP.NET Core Empty web [C#],F# Web/Empty -ASP.NET Core gRPC Service grpc [C#] Web/gRPC/API/Service -ASP.NET Core Web API webapi [C#],F# Web/Web API/API/Service/WebAPI -ASP.NET Core Web API (native AOT) webapiaot [C#] Web/Web API/API/Service -ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC -ASP.NET Core Web App (Razor Pages) webapp,razor [C#] Web/MVC/Razor Pages -Blazor Server App blazorserver [C#] Web/Blazor -Blazor Web App blazor [C#] Web/Blazor/WebAssembly -Blazor WebAssembly Standalone App blazorwasm [C#] Web/Blazor/WebAssembly/PWA -Class Library classlib [C#],F#,VB Common/Library -Console App console [C#],F#,VB Common/Console -dotnet gitignore file gitignore,.gitignore Config -Dotnet local tool manifest file tool-manifest Config -EditorConfig file editorconfig,.editorconfig Config -global.json file globaljson,global.json Config -MSBuild Directory.Build.props file buildprops MSBuild/props -MSBuild Directory.Build.targets file buildtargets MSBuild/props -MSBuild Directory.Packages.props file packagesprops MSBuild/packages/props/CPM -MSTest Playwright Test Project mstest-playwright [C#] Test/MSTest/Playwright/Desktop/Web -MSTest Test Class mstest-class [C#],F#,VB Test/MSTest -MSTest Test Project mstest [C#],F#,VB Test/MSTest/Desktop/Web -MVC Controller mvccontroller [C#] Web/ASP.NET -MVC ViewImports viewimports [C#] Web/ASP.NET -MVC ViewStart viewstart [C#] Web/ASP.NET -NuGet Config nugetconfig,nuget.config Config -NUnit 3 Test Item nunit-test [C#],F#,VB Test/NUnit -NUnit 3 Test Project nunit [C#],F#,VB Test/NUnit/Desktop/Web -NUnit Playwright Test Project nunit-playwright [C#] Test/NUnit/Playwright/Desktop/Web -Protocol Buffer File proto Web/gRPC -Razor Class Library razorclasslib [C#] Web/Razor/Library -Razor Component razorcomponent [C#] Web/ASP.NET -Razor Page page [C#] Web/ASP.NET -Razor View view [C#] Web/ASP.NET -Solution File sln,solution Solution -Web Config webconfig Config -Worker Service worker [C#],F# Common/Worker/Web -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +Template Name Short Name Language Tags +API +ASP.NET +Blazor +Class +Console +dotnet +Dotnet +EditorConfig +global.json +MSBuild +MSTest +MVC +NuGet +NUnit +Protocol +Razor +Solution +Web +Windows +Worker +WPF +xUnit diff --git a/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs b/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs index 0c1995a11340..dd6b5589ff86 100644 --- a/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs +++ b/test/dotnet-new.Tests/DotnetNewListTests.Approval.cs @@ -24,7 +24,8 @@ public Task BasicTest_WhenLegacyCommandIsUsed(string commandName) return Verify(commandResult.StdOut) .UniqueForOSPlatform() .UseTextForParameters("common") - .DisableRequireUniquePrefix(); + .DisableRequireUniquePrefix() + .AddScrubber(ScrubData); } [Fact] @@ -39,7 +40,48 @@ public Task BasicTest_WhenListCommandIsUsed() .Should() .Pass(); - return Verify(commandResult.StdOut).UniqueForOSPlatform(); + return Verify(commandResult.StdOut) + .UniqueForOSPlatform() + .AddScrubber(ScrubData); + } + + // We're listing the built in templates which we don't control so this fails often + // By scrubbing out the last three columns and then taking only the unique first words + // we can ensure that the list is showing columns and they haven't significantly changed. + // That's the best we can do for validating an output we don't control + private static void ScrubData(StringBuilder input) + { + var lines = input.ToString().Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); + var scrubbedLines = new HashSet(); + bool isTable = false; + + foreach (var line in lines) + { + if (line.StartsWith("-----")) + { + isTable = true; + continue; + } + + if (isTable) + { + var columns = line.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + if (columns.Length > 0) + { + scrubbedLines.Add(columns[0]); + } + } + else + { + scrubbedLines.Add(line); + } + } + + input.Clear(); + foreach (var scrubbedLine in scrubbedLines) + { + input.AppendLine(scrubbedLine); + } } [Fact] From 33c89e24c1fc23be97cab2dd3b8320f4889bac15 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 19 Dec 2024 10:13:27 -0800 Subject: [PATCH 05/12] Remove the windows templates for non-windows --- ....BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt | 2 -- ...ts.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt | 2 -- 2 files changed, 4 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt index b71785b20c16..219cc9d99d41 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt @@ -21,7 +21,5 @@ Protocol Razor Solution Web -Windows Worker -WPF xUnit diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt index b71785b20c16..219cc9d99d41 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt @@ -21,7 +21,5 @@ Protocol Razor Solution Web -Windows Worker -WPF xUnit From f61c45a220613ab2431a047a1b35c683184ca05e Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Fri, 10 Jan 2025 17:02:24 -0800 Subject: [PATCH 06/12] fix the template test baselines --- ...acyCommandIsUsed_common.Linux.verified.txt | 2 +- ...egacyCommandIsUsed_common.OSX.verified.txt | 2 +- ...yCommandIsUsed_common.Windows.verified.txt | 2 +- ...t_WhenListCommandIsUsed.Linux.verified.txt | 62 ++++++---------- ...est_WhenListCommandIsUsed.OSX.verified.txt | 62 ++++++---------- ...WhenListCommandIsUsed.Windows.verified.txt | 71 ++++++------------- 6 files changed, 68 insertions(+), 133 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt index 219cc9d99d41..b3bd4f2450df 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt @@ -2,7 +2,7 @@ For more information, run: dotnet new list -h These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt index 219cc9d99d41..b3bd4f2450df 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt @@ -2,7 +2,7 @@ For more information, run: dotnet new list -h These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt index b71785b20c16..c4b4746cb9f2 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt @@ -2,7 +2,7 @@ For more information, run: dotnet new list -h These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt index 6e33f11f5e09..b73c907faac4 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt @@ -1,42 +1,22 @@ These templates matched your input: - -Template Name Short Name Language Tags --------------------------------------------- -------------------------- ---------- ---------------------------------- -API Controller apicontroller [C#] Web/ASP.NET -ASP.NET Core Empty web [C#],F# Web/Empty -ASP.NET Core gRPC Service grpc [C#] Web/gRPC/API/Service -ASP.NET Core Web API webapi [C#],F# Web/Web API/API/Service/WebAPI -ASP.NET Core Web API (native AOT) webapiaot [C#] Web/Web API/API/Service -ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC -ASP.NET Core Web App (Razor Pages) webapp,razor [C#] Web/MVC/Razor Pages -Blazor Server App blazorserver [C#] Web/Blazor -Blazor Web App blazor [C#] Web/Blazor/WebAssembly -Blazor WebAssembly Standalone App blazorwasm [C#] Web/Blazor/WebAssembly/PWA -Class Library classlib [C#],F#,VB Common/Library -Console App console [C#],F#,VB Common/Console -dotnet gitignore file gitignore,.gitignore Config -Dotnet local tool manifest file tool-manifest Config -EditorConfig file editorconfig,.editorconfig Config -global.json file globaljson,global.json Config -MSBuild Directory.Build.props file buildprops MSBuild/props -MSBuild Directory.Build.targets file buildtargets MSBuild/props -MSBuild Directory.Packages.props file packagesprops MSBuild/packages/props/CPM -MSTest Playwright Test Project mstest-playwright [C#] Test/MSTest/Playwright/Desktop/Web -MSTest Test Class mstest-class [C#],F#,VB Test/MSTest -MSTest Test Project mstest [C#],F#,VB Test/MSTest/Desktop/Web -MVC Controller mvccontroller [C#] Web/ASP.NET -MVC ViewImports viewimports [C#] Web/ASP.NET -MVC ViewStart viewstart [C#] Web/ASP.NET -NuGet Config nugetconfig,nuget.config Config -NUnit 3 Test Item nunit-test [C#],F#,VB Test/NUnit -NUnit 3 Test Project nunit [C#],F#,VB Test/NUnit/Desktop/Web -NUnit Playwright Test Project nunit-playwright [C#] Test/NUnit/Playwright/Desktop/Web -Protocol Buffer File proto Web/gRPC -Razor Class Library razorclasslib [C#] Web/Razor/Library -Razor Component razorcomponent [C#] Web/ASP.NET -Razor Page page [C#] Web/ASP.NET -Razor View view [C#] Web/ASP.NET -Solution File sln,solution Solution -Web Config webconfig Config -Worker Service worker [C#],F# Common/Worker/Web -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +Template Name Short Name Language Tags +API +ASP.NET +Blazor +Class +Console +dotnet +Dotnet +EditorConfig +global.json +MSBuild +MSTest +MVC +NuGet +NUnit +Protocol +Razor +Solution +Web +Worker +xUnit diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt index 8785836d6ba0..b73c907faac4 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt @@ -1,42 +1,22 @@ These templates matched your input: - -Template Name Short Name Language Tags --------------------------------------------- -------------------------- ---------- ------------------------------ -API Controller apicontroller [C#] Web/ASP.NET -ASP.NET Core Empty web [C#],F# Web/Empty -ASP.NET Core gRPC Service grpc [C#] Web/gRPC/API/Service -ASP.NET Core Web API webapi [C#],F# Web/Web API/API/Service/WebAPI -ASP.NET Core Web API (native AOT) webapiaot [C#] Web/Web API/API/Service -ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC -ASP.NET Core Web App (Razor Pages) webapp,razor [C#] Web/MVC/Razor Pages -Blazor Server App blazorserver [C#] Web/Blazor -Blazor Web App blazor [C#] Web/Blazor/WebAssembly -Blazor WebAssembly Standalone App blazorwasm [C#] Web/Blazor/WebAssembly/PWA -Class Library classlib [C#],F#,VB Common/Library -Console App console [C#],F#,VB Common/Console -dotnet gitignore file gitignore,.gitignore Config -Dotnet local tool manifest file tool-manifest Config -EditorConfig file editorconfig,.editorconfig Config -global.json file globaljson,global.json Config -MSBuild Directory.Build.props file buildprops MSBuild/props -MSBuild Directory.Build.targets file buildtargets MSBuild/props -MSBuild Directory.Packages.props file packagesprops MSBuild/packages/props/CPM -MSTest Playwright Test Project mstest-playwright [C#] Test/MSTest/Playwright -MSTest Test Class mstest-class [C#],F#,VB Test/MSTest -MSTest Test Project mstest [C#],F#,VB Test/MSTest -MVC Controller mvccontroller [C#] Web/ASP.NET -MVC ViewImports viewimports [C#] Web/ASP.NET -MVC ViewStart viewstart [C#] Web/ASP.NET -NuGet Config nugetconfig,nuget.config Config -NUnit 3 Test Item nunit-test [C#],F#,VB Test/NUnit -NUnit 3 Test Project nunit [C#],F#,VB Test/NUnit -NUnit Playwright Test Project nunit-playwright [C#] Test/NUnit/Playwright -Protocol Buffer File proto Web/gRPC -Razor Class Library razorclasslib [C#] Web/Razor/Library -Razor Component razorcomponent [C#] Web/ASP.NET -Razor Page page [C#] Web/ASP.NET -Razor View view [C#] Web/ASP.NET -Solution File sln,solution Solution -Web Config webconfig Config -Worker Service worker [C#],F# Common/Worker/Web -xUnit Test Project xunit [C#],F#,VB Test/xUnit \ No newline at end of file +Template Name Short Name Language Tags +API +ASP.NET +Blazor +Class +Console +dotnet +Dotnet +EditorConfig +global.json +MSBuild +MSTest +MVC +NuGet +NUnit +Protocol +Razor +Solution +Web +Worker +xUnit diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt index 08816255fbd0..0f5274b54d3c 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt @@ -1,49 +1,24 @@ These templates matched your input: - -Template Name Short Name Language Tags --------------------------------------------- -------------------------- ---------- ---------------------------------- -API Controller apicontroller [C#] Web/ASP.NET -ASP.NET Core Empty web [C#],F# Web/Empty -ASP.NET Core gRPC Service grpc [C#] Web/gRPC/API/Service -ASP.NET Core Web API webapi [C#],F# Web/Web API/API/Service/WebAPI -ASP.NET Core Web API (native AOT) webapiaot [C#] Web/Web API/API/Service -ASP.NET Core Web App (Model-View-Controller) mvc [C#],F# Web/MVC -ASP.NET Core Web App (Razor Pages) webapp,razor [C#] Web/MVC/Razor Pages -Blazor Server App blazorserver [C#] Web/Blazor -Blazor Web App blazor [C#] Web/Blazor/WebAssembly -Blazor WebAssembly Standalone App blazorwasm [C#] Web/Blazor/WebAssembly/PWA -Class Library classlib [C#],F#,VB Common/Library -Console App console [C#],F#,VB Common/Console -dotnet gitignore file gitignore,.gitignore Config -Dotnet local tool manifest file tool-manifest Config -EditorConfig file editorconfig,.editorconfig Config -global.json file globaljson,global.json Config -MSBuild Directory.Build.props file buildprops MSBuild/props -MSBuild Directory.Build.targets file buildtargets MSBuild/props -MSBuild Directory.Packages.props file packagesprops MSBuild/packages/props/CPM -MSTest Playwright Test Project mstest-playwright [C#] Test/MSTest/Playwright/Desktop/Web -MSTest Test Class mstest-class [C#],F#,VB Test/MSTest -MSTest Test Project mstest [C#],F#,VB Test/MSTest/Desktop/Web -MVC Controller mvccontroller [C#] Web/ASP.NET -MVC ViewImports viewimports [C#] Web/ASP.NET -MVC ViewStart viewstart [C#] Web/ASP.NET -NuGet Config nugetconfig,nuget.config Config -NUnit 3 Test Item nunit-test [C#],F#,VB Test/NUnit -NUnit 3 Test Project nunit [C#],F#,VB Test/NUnit/Desktop/Web -NUnit Playwright Test Project nunit-playwright [C#] Test/NUnit/Playwright/Desktop/Web -Protocol Buffer File proto Web/gRPC -Razor Class Library razorclasslib [C#] Web/Razor/Library -Razor Component razorcomponent [C#] Web/ASP.NET -Razor Page page [C#] Web/ASP.NET -Razor View view [C#] Web/ASP.NET -Solution File sln,solution Solution -Web Config webconfig Config -Windows Forms App winforms [C#],VB Common/WinForms -Windows Forms Class Library winformslib [C#],VB Common/WinForms -Windows Forms Control Library winformscontrollib [C#],VB Common/WinForms -Worker Service worker [C#],F# Common/Worker/Web -WPF Application wpf [C#],VB Common/WPF -WPF Class Library wpflib [C#],VB Common/WPF -WPF Custom Control Library wpfcustomcontrollib [C#],VB Common/WPF -WPF User Control Library wpfusercontrollib [C#],VB Common/WPF -xUnit Test Project xunit [C#],F#,VB Test/xUnit/Desktop/Web \ No newline at end of file +Template Name Short Name Language Tags +API +ASP.NET +Blazor +Class +Console +dotnet +Dotnet +EditorConfig +global.json +MSBuild +MSTest +MVC +NuGet +NUnit +Protocol +Razor +Solution +Web +Windows +Worker +WPF +xUnit From 7416a654e40a84a1691e461e33d89dcd8e1cb9f0 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Jan 2025 08:48:06 -0800 Subject: [PATCH 07/12] fix the template test baselines --- ...ListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt | 2 +- ...ewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt index b73c907faac4..9d631bb2ff83 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt index b73c907faac4..9d631bb2ff83 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor From cbd103427b58f734a70f66fc6ac1bf68ec567d38 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Jan 2025 08:49:05 -0800 Subject: [PATCH 08/12] fix the template test baselines again --- ...ListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt | 2 +- ...ewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt index 9d631bb2ff83..526c5382209b 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt index 9d631bb2ff83..526c5382209b 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor From 792efbd4bd0fb94f658c1d7de4980658bf5fe872 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Jan 2025 08:50:50 -0800 Subject: [PATCH 09/12] Fix the windows leg too even though it's not running --- ...Tests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt index 0f5274b54d3c..58c8388e3a17 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt @@ -1,5 +1,5 @@ -These templates matched your input: -Template Name Short Name Language Tags +These templates matched your input: +Template Name Short Name Language Tags API ASP.NET Blazor From 062df146d651165682f1a3bba592b52e27f19de1 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Jan 2025 14:17:56 -0800 Subject: [PATCH 10/12] fixing the whitespace --- ....BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt | 2 +- ...ListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt index b3bd4f2450df..290d31ad02a8 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt @@ -2,7 +2,7 @@ For more information, run: dotnet new list -h These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt index 526c5382209b..476108146d52 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor From beff3a284fde247300b972043577b22b3e781c33 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Jan 2025 15:21:27 -0800 Subject: [PATCH 11/12] trying again to fix the whitespace by copying from the osx file --- ....BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt | 2 +- ...ListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt index 290d31ad02a8..b3bd4f2450df 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt @@ -2,7 +2,7 @@ For more information, run: dotnet new list -h These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt index 476108146d52..526c5382209b 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor From 2f08bc044842fd7374038e59198eb58817ecc22f Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Mon, 13 Jan 2025 15:28:59 -0800 Subject: [PATCH 12/12] Another try at the whitespace --- ....BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt | 2 +- ...asicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt | 2 +- ...ListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt | 2 +- ...stTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt index b3bd4f2450df..290d31ad02a8 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt @@ -2,7 +2,7 @@ For more information, run: dotnet new list -h These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt index c4b4746cb9f2..740f88f930a7 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt @@ -2,7 +2,7 @@ For more information, run: dotnet new list -h These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt index 526c5382209b..476108146d52 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor diff --git a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt index 58c8388e3a17..23fe5e9c1180 100644 --- a/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt +++ b/test/dotnet-new.Tests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt @@ -1,5 +1,5 @@ These templates matched your input: -Template Name Short Name Language Tags +Template Name Short Name Language Tags API ASP.NET Blazor