File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
System.CommandLine/Builder Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -1106,6 +1106,21 @@ public void Required_options_are_indicated_when_argument_is_named()
11061106 . Contain ( "-r, --required <ARG> (REQUIRED)" ) ;
11071107 }
11081108
1109+ [ Fact ]
1110+ public void Help_option_is_shown_in_help ( )
1111+ {
1112+ var parser = new CommandLineBuilder ( )
1113+ . UseHelp ( )
1114+ . Build ( ) ;
1115+
1116+ _helpBuilder . Write ( parser . Configuration . RootCommand ) ;
1117+
1118+ var help = _console . Out . ToString ( ) ;
1119+
1120+ help . Should ( )
1121+ . Contain ( $ "--help{ _columnPadding } Show help and usage information") ;
1122+ }
1123+
11091124 #endregion Options
11101125
11111126 #region Subcommands
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public async Task Version_option_appears_in_help()
6666 console . Out
6767 . ToString ( )
6868 . Should ( )
69- . Match ( "*Options:*--version*Display version information*" ) ;
69+ . Match ( "*Options:*--version*Show version information*" ) ;
7070 }
7171
7272 [ Fact ]
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ public static CommandLineBuilder UseHelp(this CommandLineBuilder builder)
275275 "--help" ,
276276 "-?" ,
277277 "/?"
278- } ) ;
278+ } , "Show help and usage information" ) ;
279279
280280 return builder . UseHelp ( helpOption ) ;
281281 }
@@ -428,7 +428,7 @@ public static CommandLineBuilder UseVersionOption(
428428 return builder ;
429429 }
430430
431- var versionOption = new Option ( "--version" , "Display version information" ) ;
431+ var versionOption = new Option ( "--version" , "Show version information" ) ;
432432
433433 builder . AddOption ( versionOption ) ;
434434
You can’t perform that action at this time.
0 commit comments