From d3606772dc94942bc6ff402e3389cbccf2c0a592 Mon Sep 17 00:00:00 2001 From: Jan Krivanek Date: Fri, 21 Oct 2022 16:57:06 +0200 Subject: [PATCH] Fix version mismatches --- eng/Versions.props | 2 +- .../MyProject/Program.cs | 12 -------- .../MyProject/console.csproj | 9 ------ .../MyProject/Program.cs | 12 -------- .../MyProject/console.csproj | 10 ------- .../MyProject/Program.cs | 4 --- .../MyProject/console.csproj | 10 ------- .../MyProject/Program.cs | 2 -- .../MyProject/console.csproj | 10 ------- .../MyProject/Program.cs | 2 -- .../MyProject/console.csproj | 11 ------- .../dotnet-new.Tests/CommonTemplatesTests.cs | 30 +++++++++---------- 12 files changed, 16 insertions(+), 98 deletions(-) delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/Program.cs delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/console.csproj delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/Program.cs delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/console.csproj delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/Program.cs delete mode 100644 src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/console.csproj diff --git a/eng/Versions.props b/eng/Versions.props index 0b5ea2e9c763..b4c180b8c759 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -133,7 +133,7 @@ $(MicrosoftTemplateEngineAbstractionsPackageVersion) $(MicrosoftTemplateEngineAbstractionsPackageVersion) - $(MicrosoftTemplateEngineAbstractionsPackageVersion) + $(MicrosoftTemplateEngineAbstractionsPackageVersion) diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs deleted file mode 100644 index eb556c611f8f..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace console -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello, World!"); - } - } -} diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj deleted file mode 100644 index e90b46d9acdb..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-False#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - Exe - net7.0 - %LANG% - - - diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs deleted file mode 100644 index eb556c611f8f..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace console -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello, World!"); - } - } -} diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj deleted file mode 100644 index 7dfb8ec8ba15..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-False#ImplicitUsings-False.verified/MyProject/console.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net7.0 - %LANG% - enable - - - diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/Program.cs b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/Program.cs deleted file mode 100644 index ea0a451f4903..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/Program.cs +++ /dev/null @@ -1,4 +0,0 @@ -// See https://aka.ms/new-console-template for more information -using System; - -Console.WriteLine("Hello, World!"); diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/console.csproj b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/console.csproj deleted file mode 100644 index 7dfb8ec8ba15..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-False.verified/MyProject/console.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net7.0 - %LANG% - enable - - - diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/Program.cs b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/Program.cs deleted file mode 100644 index 3751555cbd32..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/Program.cs +++ /dev/null @@ -1,2 +0,0 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/console.csproj b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/console.csproj deleted file mode 100644 index 780397f26459..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True#NoLang.verified/MyProject/console.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net7.0 - enable - enable - - - diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/Program.cs b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/Program.cs deleted file mode 100644 index 3751555cbd32..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/Program.cs +++ /dev/null @@ -1,2 +0,0 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); diff --git a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/console.csproj b/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/console.csproj deleted file mode 100644 index e8aab907fdf2..000000000000 --- a/src/Tests/dotnet-new.Tests/Approvals/TopLevelProgramSupport.Nullable-True#TopLevel-True#ImplicitUsings-True.verified/MyProject/console.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - Exe - net7.0 - %LANG% - enable - enable - - - diff --git a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs index 888911fb9252..ee6e9e044606 100644 --- a/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs +++ b/src/Tests/dotnet-new.Tests/CommonTemplatesTests.cs @@ -92,8 +92,8 @@ public async void AllCommonProjectsCreateRestoreAndBuild(string expectedTemplate VerifyCommandOutput = true, VerificationExcludePatterns = new[] { "*.cs", "*.fs", "*.vb", "*.*proj" }, DoNotPrependCallerMethodNameToScenarioName = false, - DoNotAppendParamsToScenarioName = true, - DoNotPrependTemplateToScenarioName = true, + DoNotAppendTemplateArgsToScenarioName = true, + DoNotPrependTemplateNameToScenarioName = true, } .WithCustomScrubbers( ScrubbersDefinition.Empty @@ -184,9 +184,9 @@ public async void AllCommonProjectsCreate_NoRestore(string expectedTemplateName, ExpectationsDirectory = "Approvals", VerifyCommandOutput = true, VerificationIncludePatterns = new[] { "*.txt" }, - DoNotAppendParamsToScenarioName = true, + DoNotAppendTemplateArgsToScenarioName = true, SettingsDirectory = _fixture.HomeDirectory, - DoNotPrependTemplateToScenarioName = true, + DoNotPrependTemplateNameToScenarioName = true, } .WithCustomScrubbers( ScrubbersDefinition.Empty @@ -212,9 +212,9 @@ public async void AllCommonItemsCreate(string expectedTemplateName, string templ ExpectationsDirectory = "Approvals", VerifyCommandOutput = true, VerificationIncludePatterns = new[] { "*.txt" }, - DoNotAppendParamsToScenarioName = true, + DoNotAppendTemplateArgsToScenarioName = true, SettingsDirectory = _fixture.HomeDirectory, - DoNotPrependTemplateToScenarioName = true, + DoNotPrependTemplateNameToScenarioName = true, } .WithCustomScrubbers( ScrubbersDefinition.Empty @@ -364,9 +364,9 @@ public async void TopLevelProgramSupport_WhenFlagIsEnabled(string? langVersion) ExpectationsDirectory = "Approvals", OutputDirectory = workingDir, SettingsDirectory = _fixture.HomeDirectory, - // DoNotPrependTemplateToScenarioName = true, - DoNotAppendParamsToScenarioName = true, - ScenarioDistinguisher = langVersion == null ? "#NoLang" : null, + // DoNotPrependTemplateNameToScenarioName = true, + DoNotAppendTemplateArgsToScenarioName = true, + ScenarioName = langVersion == null ? "#NoLang" : null, } .WithCustomScrubbers( ScrubbersDefinition.Empty @@ -400,9 +400,9 @@ public async void TopLevelProgramSupport_WhenFlagIsEnabled_NoFileScopedNamespace TemplateSpecificArgs = args, ExpectationsDirectory = "Approvals", SettingsDirectory = _fixture.HomeDirectory, - // DoNotPrependTemplateToScenarioName = true, - DoNotAppendParamsToScenarioName = true, - DoNotPrependTemplateToScenarioName = true, + // DoNotPrependTemplateNameToScenarioName = true, + DoNotAppendTemplateArgsToScenarioName = true, + DoNotPrependTemplateNameToScenarioName = true, } .WithCustomScrubbers( ScrubbersDefinition.Empty @@ -519,9 +519,9 @@ public async void FeaturesSupport( ExpectationsDirectory = "Approvals", OutputDirectory = workingDir, SettingsDirectory = _fixture.HomeDirectory, - DoNotPrependTemplateToScenarioName = false, - DoNotAppendParamsToScenarioName = true, - ScenarioDistinguisher = !buildPass ? + DoNotPrependTemplateNameToScenarioName = false, + DoNotAppendTemplateArgsToScenarioName = true, + ScenarioName = !buildPass ? "OutOfSupport" : $"Nullable-{supportsNullable}#TopLevel-{supportsTopLevel}#ImplicitUsings-{supportsImplicitUsings}#FileScopedNs-{supportsFileScopedNs}" + (langVersion == null ? "#NoLang" : null), VerificationExcludePatterns = buildPass ? null : new[] { "*" },