From 9b748083dbc75eb1c9d40b684c1d4383c3098136 Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Fri, 4 Jul 2025 23:49:45 +1000 Subject: [PATCH 1/3] move to Verify --- .editorconfig | 10 + .gitattributes | 3 + .gitignore | 4 +- Directory.Packages.props | 10 +- eng/Versions.props | 5 + ...ommandLine_api_is_not_changed.approved.txt | 274 ------------------ ...rovalTests.cs => ApiCompatibilityTests.cs} | 12 +- ....CommandLine.ApiCompatibility.Tests.csproj | 4 +- .../Help/ApprovalTests.Config.cs | 8 - ...s.Help_layout_has_not_changed.approved.txt | 24 -- .../Help/HelpBuilderTests.Approval.cs | 9 +- .../System.CommandLine.Tests.csproj | 2 +- .../VerifyChecksTests.cs | 10 + 13 files changed, 46 insertions(+), 329 deletions(-) delete mode 100644 src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt rename src/System.CommandLine.ApiCompatibility.Tests/{ApiCompatibilityApprovalTests.cs => ApiCompatibilityTests.cs} (61%) delete mode 100644 src/System.CommandLine.Tests/Help/ApprovalTests.Config.cs delete mode 100644 src/System.CommandLine.Tests/Help/Approvals/HelpBuilderTests.Help_layout_has_not_changed.approved.txt create mode 100644 src/System.CommandLine.Tests/VerifyChecksTests.cs 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..5fc7e75fe9 100644 --- a/.gitignore +++ b/.gitignore @@ -153,5 +153,5 @@ TestResults/ .fake .ionide -# ApprovalTests -*.received.txt +# Verify +*.verified.txt diff --git a/Directory.Packages.props b/Directory.Packages.props index da1e624248..6f89d9b4b0 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/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt deleted file mode 100644 index 45cc9f778a..0000000000 --- a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt +++ /dev/null @@ -1,274 +0,0 @@ -System.CommandLine - public abstract class Argument : Symbol - public ArgumentArity Arity { get; set; } - public System.Collections.Generic.List>> CompletionSources { get; } - public System.Boolean HasDefaultValue { get; } - public System.String HelpName { get; set; } - public System.Collections.Generic.List> Validators { get; } - public System.Type ValueType { get; } - public System.Collections.Generic.IEnumerable GetCompletions(System.CommandLine.Completions.CompletionContext context) - public System.Object GetDefaultValue() - public System.String ToString() - public class Argument : Argument - .ctor(System.String name) - public Func CustomParser { get; set; } - public Func DefaultValueFactory { get; set; } - public System.Boolean HasDefaultValue { get; } - public System.Type ValueType { get; } - public struct ArgumentArity : System.ValueType, System.IEquatable - public static ArgumentArity ExactlyOne { get; } - public static ArgumentArity OneOrMore { get; } - public static ArgumentArity Zero { get; } - public static ArgumentArity ZeroOrMore { get; } - public static ArgumentArity ZeroOrOne { get; } - .ctor(System.Int32 minimumNumberOfValues, System.Int32 maximumNumberOfValues) - public System.Int32 MaximumNumberOfValues { get; } - public System.Int32 MinimumNumberOfValues { get; } - public System.Boolean Equals(ArgumentArity other) - public System.Boolean Equals(System.Object obj) - public System.Int32 GetHashCode() - public static class ArgumentValidation - public static Argument AcceptExistingOnly(this Argument argument) - public static Argument AcceptExistingOnly(this Argument argument) - public static Argument AcceptExistingOnly(this Argument argument) - public static Argument AcceptExistingOnly(this Argument argument) - public static Argument AcceptLegalFileNamesOnly(this Argument argument) - public static Argument AcceptLegalFilePathsOnly(this Argument argument) - public static Argument AcceptOnlyFromAmong(this Argument argument, System.String[] values) - public class Command : Symbol, System.Collections.IEnumerable - .ctor(System.String name, System.String description = null) - public System.CommandLine.Invocation.CommandLineAction Action { get; set; } - public System.Collections.Generic.ICollection Aliases { get; } - public System.Collections.Generic.IList Arguments { get; } - public System.Collections.Generic.IEnumerable Children { get; } - public System.Collections.Generic.IList