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()
1106
1106
. Contain ( "-r, --required <ARG> (REQUIRED)" ) ;
1107
1107
}
1108
1108
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
+
1109
1124
#endregion Options
1110
1125
1111
1126
#region Subcommands
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public async Task Version_option_appears_in_help()
66
66
console . Out
67
67
. ToString ( )
68
68
. Should ( )
69
- . Match ( "*Options:*--version*Display version information*" ) ;
69
+ . Match ( "*Options:*--version*Show version information*" ) ;
70
70
}
71
71
72
72
[ Fact ]
Original file line number Diff line number Diff line change @@ -275,7 +275,7 @@ public static CommandLineBuilder UseHelp(this CommandLineBuilder builder)
275
275
"--help" ,
276
276
"-?" ,
277
277
"/?"
278
- } ) ;
278
+ } , "Show help and usage information" ) ;
279
279
280
280
return builder . UseHelp ( helpOption ) ;
281
281
}
@@ -428,7 +428,7 @@ public static CommandLineBuilder UseVersionOption(
428
428
return builder ;
429
429
}
430
430
431
- var versionOption = new Option ( "--version" , "Display version information" ) ;
431
+ var versionOption = new Option ( "--version" , "Show version information" ) ;
432
432
433
433
builder . AddOption ( versionOption ) ;
434
434
You can’t perform that action at this time.
0 commit comments