diff --git a/.editorconfig b/.editorconfig
index acdab74f70..241ebfee58 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -29,3 +29,13 @@ dotnet_style_qualification_for_field=false:warning
dotnet_style_qualification_for_method=false:warning
dotnet_style_qualification_for_property=false:warning
dotnet_style_require_accessibility_modifiers=for_non_interface_members:hint
+
+# Verify
+[*.{received,verified}.{txt}]
+charset = utf-8-bom
+end_of_line = lf
+indent_size = unset
+indent_style = unset
+insert_final_newline = false
+tab_width = unset
+trim_trailing_whitespace = false
diff --git a/.gitattributes b/.gitattributes
index be4c25d817..28d15dce1b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -46,3 +46,6 @@
# treat as binary
###############################################################################
*.snk binary
+
+# Verify
+*.verified.txt text eol=lf working-tree-encoding=UTF-8
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index c5d5441da2..8d561842af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -153,5 +153,5 @@ TestResults/
.fake
.ionide
-# ApprovalTests
+# Verify
*.received.txt
diff --git a/Directory.Packages.props b/Directory.Packages.props
index da1e624248..9a7e0b1d0f 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -1,31 +1,27 @@
-
true
true
$(NoWarn);NU1507
-
-
+
-
-
-
+
+
-
\ No newline at end of file
diff --git a/eng/Versions.props b/eng/Versions.props
index 62f4f4068b..61969816e4 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -3,5 +3,10 @@
2.0.0
beta7
+
+ 2.9.3
+ 1.22.0
+ 3.1.1
+
diff --git a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityTests.System_CommandLine_api_is_not_changed.verified.txt
similarity index 100%
rename from src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt
rename to src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityTests.System_CommandLine_api_is_not_changed.verified.txt
diff --git a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.cs b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityTests.cs
similarity index 61%
rename from src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.cs
rename to src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityTests.cs
index 0e0a21633c..4f2a1a6337 100644
--- a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.cs
+++ b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityTests.cs
@@ -1,19 +1,18 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-using ApprovalTests;
-using ApprovalTests.Reporters;
+using System.Threading.Tasks;
+using VerifyXunit;
using Xunit;
namespace System.CommandLine.ApiCompatibility.Tests;
-public class ApiCompatibilityApprovalTests
+public class ApiCompatibilityTests
{
[Fact]
- [UseReporter(typeof(DiffReporter))]
- public void System_CommandLine_api_is_not_changed()
+ public Task System_CommandLine_api_is_not_changed()
{
var contract = ApiContract.GenerateContractForAssembly(typeof(ParseResult).Assembly);
- Approvals.Verify(contract);
+ return Verifier.Verify(contract);
}
}
\ No newline at end of file
diff --git a/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj b/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj
index 6f1488383c..58540aaf4f 100644
--- a/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj
+++ b/src/System.CommandLine.ApiCompatibility.Tests/System.CommandLine.ApiCompatibility.Tests.csproj
@@ -5,11 +5,11 @@
-
+
-
+
diff --git a/src/System.CommandLine.Tests/Help/ApprovalTests.Config.cs b/src/System.CommandLine.Tests/Help/ApprovalTests.Config.cs
deleted file mode 100644
index bbf662f44f..0000000000
--- a/src/System.CommandLine.Tests/Help/ApprovalTests.Config.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using ApprovalTests.Reporters;
-using ApprovalTests.Reporters.TestFrameworks;
-
-// Use globally defined Reporter for ApprovalTests. Please see
-// https://github.com/approvals/ApprovalTests.Net/blob/master/docs/ApprovalTests/Reporters.md
-
-[assembly: UseReporter(typeof(FrameworkAssertReporter))]
-[assembly: ApprovalTests.Namers.UseApprovalSubdirectory("Approvals")]
diff --git a/src/System.CommandLine.Tests/Help/HelpBuilderTests.Approval.cs b/src/System.CommandLine.Tests/Help/HelpBuilderTests.Approval.cs
index 0cb2b097ce..93c65dd8cf 100644
--- a/src/System.CommandLine.Tests/Help/HelpBuilderTests.Approval.cs
+++ b/src/System.CommandLine.Tests/Help/HelpBuilderTests.Approval.cs
@@ -3,16 +3,15 @@
using Xunit;
using System.IO;
-using ApprovalTests;
-using ApprovalTests.Reporters;
+using System.Threading.Tasks;
+using VerifyXunit;
namespace System.CommandLine.Tests.Help
{
public partial class HelpBuilderTests
{
[Fact]
- [UseReporter(typeof(DiffReporter))]
- public void Help_layout_has_not_changed()
+ public Task Help_layout_has_not_changed()
{
var command = new Command("the-root-command", "Test description")
{
@@ -75,7 +74,7 @@ public void Help_layout_has_not_changed()
StringWriter writer = new();
GetHelpBuilder(LargeMaxWidth).Write(command, writer);
- Approvals.Verify(writer.ToString());
+ return Verifier.Verify(writer.ToString());
}
}
}
diff --git a/src/System.CommandLine.Tests/Help/Approvals/HelpBuilderTests.Help_layout_has_not_changed.approved.txt b/src/System.CommandLine.Tests/Help/HelpBuilderTests.Help_layout_has_not_changed.verified.txt
similarity index 100%
rename from src/System.CommandLine.Tests/Help/Approvals/HelpBuilderTests.Help_layout_has_not_changed.approved.txt
rename to src/System.CommandLine.Tests/Help/HelpBuilderTests.Help_layout_has_not_changed.verified.txt
diff --git a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
index a7695f0dc7..9a80b58f57 100644
--- a/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
+++ b/src/System.CommandLine.Tests/System.CommandLine.Tests.csproj
@@ -30,10 +30,10 @@
-
+
diff --git a/src/System.CommandLine.Tests/VerifyChecksTests.cs b/src/System.CommandLine.Tests/VerifyChecksTests.cs
new file mode 100644
index 0000000000..a1c46bd0d7
--- /dev/null
+++ b/src/System.CommandLine.Tests/VerifyChecksTests.cs
@@ -0,0 +1,10 @@
+using System.Threading.Tasks;
+using VerifyXunit;
+using Xunit;
+
+public class VerifyChecksTests
+{
+ [Fact]
+ public Task Run() =>
+ VerifyChecks.Run();
+}
\ No newline at end of file