We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45e5891 commit 7388936Copy full SHA for 7388936
src/System.CommandLine.Tests/ParseErrorReportingTests.cs
@@ -86,6 +86,22 @@ public void When_there_are_parse_errors_then_customized_help_action_is_used_if_p
86
wasCalled.Should().BeTrue();
87
}
88
89
+ [Fact]
90
+ public void When_no_help_option_is_present_then_help_is_not_shown_for_parse_errors()
91
+ {
92
+ CliRootCommand rootCommand = new();
93
+ rootCommand.Options.Clear();
94
+ var output = new StringWriter();
95
+ CliConfiguration config = new(rootCommand)
96
97
+ Output = output
98
+ };
99
+
100
+ config.Parse("oops").Invoke();
101
102
+ output.ToString().Should().NotShowHelp();
103
+ }
104
105
private class SynchronousCustomHelpAction : SynchronousCliAction
106
{
107
private readonly Action _onInvoke;
0 commit comments