@@ -14,58 +14,57 @@ public void Help_describes_default_values_for_complex_root_command_scenario()
14
14
{
15
15
var command = new RootCommand ( description : "Test description" )
16
16
{
17
- new Argument < string > ( "the-root- arg-no-description-no-default" ) ,
18
- new Argument < string > ( "the-root- arg-no-description-default" ,
19
- argResult => "the-root- arg-no-description-default-value" ,
17
+ new Argument < string > ( "arg-no-description-no-default" ) ,
18
+ new Argument < string > ( "arg-no-description-default" ,
19
+ argResult => "arg-no-description-default-value" ,
20
20
isDefault : true ) ,
21
- new Argument < string > ( "the-root- arg-no-default" )
21
+ new Argument < string > ( "arg-no-default" )
22
22
{
23
- Description = "the-root- arg-no-default-description" ,
23
+ Description = "arg-no-default-description" ,
24
24
} ,
25
- new Argument < string > ( "the-root- arg" , ( ) => "the-root- arg-one-value" )
25
+ new Argument < string > ( "arg" , ( ) => "arg-one-value" )
26
26
{
27
- Description = "the-root- arg-description"
27
+ Description = "arg-description"
28
28
} ,
29
- new Argument < FileAccess > ( "the-root- arg-enum-default" , ( ) => FileAccess . Read )
29
+ new Argument < FileAccess > ( "arg-enum-default" , ( ) => FileAccess . Read )
30
30
{
31
- Description = "the-root-arg-enum-default-description" ,
32
- ArgumentType = typeof ( FileAccess )
31
+ Description = "arg-enum-default-description" ,
33
32
} ,
34
- new Option ( aliases : new string [ ] { "--the-root- option-no-arg" , "-trna " } ) {
35
- Description = "the-root- option-no-arg-description" ,
33
+ new Option ( aliases : new string [ ] { "--option-no-arg" , "-na " } ) {
34
+ Description = "option-no-arg-description" ,
36
35
IsRequired = true
37
36
} ,
38
37
new Option < string > (
39
- aliases : new string [ ] { "--the-root- option-no-description-default-arg" , "-trondda " } ,
40
- parseArgument : _ => "the-root- option- -no-description-default-arg-value" ,
38
+ aliases : new string [ ] { "--option-no-description-default-arg" , "-ondda " } ,
39
+ parseArgument : _ => "option-no-description-default-arg-value" ,
41
40
isDefault : true
42
41
) ,
43
- new Option < string > ( aliases : new string [ ] { "--the-root- option-no-default-arg" , "-tronda " } ) {
44
- Description = "the-root- option-no-default-description" ,
45
- ArgumentHelpName = "the-root- option-arg-no-default-arg" ,
42
+ new Option < string > ( aliases : new string [ ] { "--option-no-default-arg" , "-onda " } ) {
43
+ Description = "option-no-default-description" ,
44
+ ArgumentHelpName = "option-arg-no-default-arg" ,
46
45
IsRequired = true
47
46
} ,
48
- new Option < string > ( aliases : new string [ ] { "--the-root- option-default-arg" , "-troda " } , ( ) => "the-root- option-arg-value" )
47
+ new Option < string > ( aliases : new string [ ] { "--option-default-arg" , "-oda " } , ( ) => "option-arg-value" )
49
48
{
50
- Description = "the-root- option-default-arg-description" ,
51
- ArgumentHelpName = "the-root- option-arg" ,
49
+ Description = "option-default-arg-description" ,
50
+ ArgumentHelpName = "option-arg" ,
52
51
} ,
53
- new Option < FileAccess > ( aliases : new string [ ] { "--the-root- option-enum-arg" , "-troea " } , ( ) => FileAccess . Read )
52
+ new Option < FileAccess > ( aliases : new string [ ] { "--option-enum-arg" , "-oea " } , ( ) => FileAccess . Read )
54
53
{
55
- Description = "the-root- option-description" ,
56
- ArgumentHelpName = "the-root- option-arg" ,
54
+ Description = "option-description" ,
55
+ ArgumentHelpName = "option-arg" ,
57
56
} ,
58
- new Option < FileAccess > ( aliases : new string [ ] { "--the-root- option-required-enum-arg" , "-trorea " } , ( ) => FileAccess . Read )
57
+ new Option < FileAccess > ( aliases : new string [ ] { "--option-required-enum-arg" , "-orea " } , ( ) => FileAccess . Read )
59
58
{
60
- Description = "the-root- option-description" ,
61
- ArgumentHelpName = "the-root- option-arg" ,
59
+ Description = "option-description" ,
60
+ ArgumentHelpName = "option-arg" ,
62
61
IsRequired = true
63
62
} ,
64
- new Option ( aliases : new string [ ] { "--the-root- option-multi-line-description" , "-tromld " } ) {
65
- Description = "the-root- option\r \n multi-line\n description"
63
+ new Option ( aliases : new string [ ] { "--option-multi-line-description" , "-omld " } ) {
64
+ Description = "option with \r \n multi-line\n description"
66
65
}
67
66
} ;
68
- command . Name = "the-root- command" ;
67
+ command . Name = "command" ;
69
68
70
69
GetHelpBuilder ( LargeMaxWidth ) . Write ( command ) ;
71
70
Approvals . Verify ( _console . Out . ToString ( ) ) ;
0 commit comments