mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 21:38:16 +08:00
Add support for .NET 7.0
This commit is contained in:

committed by
Patrik Svensson

parent
02f9d26473
commit
7dce4af552
@ -9,7 +9,7 @@
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Roslynator.Analyzers" Version="4.1.1">
|
||||
<PackageReference Include="Roslynator.Analyzers" Version="4.1.2">
|
||||
<PrivateAssets>All</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net6.0;net48</TargetFrameworks>
|
||||
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net6.0</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net7.0;net48</TargetFrameworks>
|
||||
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net7.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -14,10 +14,9 @@
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="Shouldly" Version="4.0.3" />
|
||||
<PackageReference Include="Spectre.Verify.Extensions" Version="17.1.6" />
|
||||
<PackageReference Include="Verify.Xunit" Version="17.1.6" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
|
||||
<PackageReference Include="Shouldly" Version="4.1.0" />
|
||||
<PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
@ -31,15 +30,15 @@
|
||||
<ProjectReference Include="..\..\src\Spectre.Console\Spectre.Console.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Expectations\Help\Description_No_Trailing_Period.Output.received.txt">
|
||||
<ParentFile>$([System.String]::Copy('%(FileName)').Split('.')[0])</ParentFile>
|
||||
<DependentUpon>%(ParentFile).cs</DependentUpon>
|
||||
</None>
|
||||
<None Update="Expectations\Help\Description_No_Trailing_Period.Output.verified.txt">
|
||||
<ParentFile>$([System.String]::Copy('%(FileName)').Split('.')[0])</ParentFile>
|
||||
<DependentUpon>%(ParentFile).cs</DependentUpon>
|
||||
</None>
|
||||
<ItemGroup>
|
||||
<None Update="Expectations\Help\Description_No_Trailing_Period.Output.received.txt">
|
||||
<ParentFile>$([System.String]::Copy('%(FileName)').Split('.')[0])</ParentFile>
|
||||
<DependentUpon>%(ParentFile).cs</DependentUpon>
|
||||
</None>
|
||||
<None Update="Expectations\Help\Description_No_Trailing_Period.Output.verified.txt">
|
||||
<ParentFile>$([System.String]::Copy('%(FileName)').Split('.')[0])</ParentFile>
|
||||
<DependentUpon>%(ParentFile).cs</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if !NET5_0_OR_GREATER
|
||||
#if !NET6_0_OR_GREATER
|
||||
namespace System.Runtime.CompilerServices;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
|
||||
|
@ -5,6 +5,6 @@ public static class VerifyConfiguration
|
||||
[ModuleInitializer]
|
||||
public static void Init()
|
||||
{
|
||||
VerifierSettings.DerivePathInfo(Expectations.Initialize);
|
||||
Verifier.DerivePathInfo(Expectations.Initialize);
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net6.0;net48</TargetFrameworks>
|
||||
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net6.0</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('Windows'))">net7.0;net48</TargetFrameworks>
|
||||
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('Windows'))">net7.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -18,10 +18,9 @@
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="Shouldly" Version="4.0.3" />
|
||||
<PackageReference Include="Spectre.Verify.Extensions" Version="17.1.6" />
|
||||
<PackageReference Include="Verify.Xunit" Version="17.1.6" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
|
||||
<PackageReference Include="Shouldly" Version="4.1.0" />
|
||||
<PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
@ -302,7 +302,7 @@ public sealed class StyleTests
|
||||
[InlineData("rgb(255)", "Invalid RGB color 'rgb(255)'.")]
|
||||
[InlineData("rgb(255,255)", "Invalid RGB color 'rgb(255,255)'.")]
|
||||
[InlineData("rgb(255,255,255", "Invalid RGB color 'rgb(255,255,255'.")]
|
||||
[InlineData("rgb(A,B,C)", "Invalid RGB color 'rgb(A,B,C)'. Input string was not in a correct format.")]
|
||||
[InlineData("rgb(A,B,C)", "Invalid RGB color 'rgb(A,B,C)'.")]
|
||||
public void Should_Return_Error_If_Rgb_Color_Is_Invalid(string style, string expected)
|
||||
{
|
||||
// Given, When
|
||||
@ -310,7 +310,7 @@ public sealed class StyleTests
|
||||
|
||||
// Then
|
||||
result.ShouldNotBeNull();
|
||||
result.Message.ShouldBe(expected);
|
||||
result.Message.ShouldStartWith(expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#if !NET5_0_OR_GREATER
|
||||
#if !NET6_0_OR_GREATER
|
||||
namespace System.Runtime.CompilerServices;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
|
||||
|
@ -5,6 +5,6 @@ public static class VerifyConfiguration
|
||||
[ModuleInitializer]
|
||||
public static void Init()
|
||||
{
|
||||
VerifierSettings.DerivePathInfo(Expectations.Initialize);
|
||||
Verifier.DerivePathInfo(Expectations.Initialize);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user