@@ -10,11 +10,11 @@ fn test_empty() {
10
10
ap. set_description ( "Test program" ) ;
11
11
assert ! ( ap. print_help( "./argparse_test" , & mut buf) . is_ok( ) ) ;
12
12
assert_eq ! ( "Usage:\n " . to_string( )
13
- + " ./argparse_test\n "
13
+ + " ./argparse_test\n "
14
14
+ "\n "
15
15
+ "Test program\n "
16
16
+ "\n "
17
- + "optional arguments:\n "
17
+ + "Optional arguments:\n "
18
18
+ " -h,--help show this help message and exit\n "
19
19
, from_utf8( & buf[ ..] ) . unwrap( ) . to_string( ) ) ;
20
20
}
@@ -36,13 +36,13 @@ fn test_options() {
36
36
let mut buf = Vec :: < u8 > :: new ( ) ;
37
37
assert ! ( ap. print_help( "./argparse_test" , & mut buf) . is_ok( ) ) ;
38
38
assert_eq ! ( "Usage:\n " . to_string( )
39
- + " ./argparse_test [OPTIONS]
39
+ + " ./argparse_test [OPTIONS]
40
40
41
41
Test program. The description of the program is ought to be very long, because
42
42
we want to test how word wrapping works for it. So some more text would be ok
43
43
for the test\n "
44
44
+ "\n "
45
- + "optional arguments:\n "
45
+ + "Optional arguments:\n "
46
46
+ " -h,--help show this help message and exit\n "
47
47
+ " --value VALUE Set integer value\n "
48
48
+ " -L,--long-option LONG_OPTION\n "
@@ -61,14 +61,14 @@ fn test_argument() {
61
61
let mut buf = Vec :: < u8 > :: new ( ) ;
62
62
assert ! ( ap. print_help( "./argparse_test" , & mut buf) . is_ok( ) ) ;
63
63
assert_eq ! ( "Usage:\n " . to_string( )
64
- + " ./argparse_test [VALUE]\n "
64
+ + " ./argparse_test [VALUE]\n "
65
65
+ "\n "
66
66
+ "Test program\n "
67
67
+ "\n "
68
- + "positional arguments:\n "
68
+ + "Positional arguments:\n "
69
69
+ " value Integer value\n "
70
70
+ "\n "
71
- + "optional arguments:\n "
71
+ + "Optional arguments:\n "
72
72
+ " -h,--help show this help message and exit\n "
73
73
, from_utf8( & buf[ ..] ) . unwrap( ) . to_string( ) ) ;
74
74
}
@@ -88,15 +88,15 @@ fn test_arguments() {
88
88
let mut buf = Vec :: < u8 > :: new ( ) ;
89
89
assert ! ( ap. print_help( "./argparse_test" , & mut buf) . is_ok( ) ) ;
90
90
assert_eq ! ( "Usage:\n " . to_string( )
91
- + " ./argparse_test [V1] [V2 ...]\n "
91
+ + " ./argparse_test [V1] [V2 ...]\n "
92
92
+ "\n "
93
93
+ "Test program\n "
94
94
+ "\n "
95
- + "positional arguments:\n "
95
+ + "Positional arguments:\n "
96
96
+ " v1 Integer value 1\n "
97
97
+ " v2 More values\n "
98
98
+ "\n "
99
- + "optional arguments:\n "
99
+ + "Optional arguments:\n "
100
100
+ " -h,--help show this help message and exit\n "
101
101
, from_utf8( & buf[ ..] ) . unwrap( ) . to_string( ) ) ;
102
102
}
@@ -118,15 +118,15 @@ fn test_req_arguments() {
118
118
let mut buf = Vec :: < u8 > :: new ( ) ;
119
119
assert ! ( ap. print_help( "./argparse_test" , & mut buf) . is_ok( ) ) ;
120
120
assert_eq ! ( "Usage:\n " . to_string( )
121
- + " ./argparse_test V1 V2 [...]\n "
121
+ + " ./argparse_test V1 V2 [...]\n "
122
122
+ "\n "
123
123
+ "Test program\n "
124
124
+ "\n "
125
- + "positional arguments:\n "
125
+ + "Positional arguments:\n "
126
126
+ " v1 Integer value 1\n "
127
127
+ " v2 More values\n "
128
128
+ "\n "
129
- + "optional arguments:\n "
129
+ + "Optional arguments:\n "
130
130
+ " -h,--help show this help message and exit\n "
131
131
, from_utf8( & buf[ ..] ) . unwrap( ) . to_string( ) ) ;
132
132
}
@@ -143,11 +143,11 @@ fn test_metavar() {
143
143
let mut buf = Vec :: < u8 > :: new ( ) ;
144
144
assert ! ( ap. print_help( "./argparse_test" , & mut buf) . is_ok( ) ) ;
145
145
assert_eq ! ( "Usage:\n " . to_string( )
146
- + " ./argparse_test [OPTIONS]\n "
146
+ + " ./argparse_test [OPTIONS]\n "
147
147
+ "\n "
148
148
+ "Test program.\n "
149
149
+ "\n "
150
- + "optional arguments:\n "
150
+ + "Optional arguments:\n "
151
151
+ " -h,--help show this help message and exit\n "
152
152
+ " -L,--long-option VAL Long option value\n "
153
153
, from_utf8( & buf[ ..] ) . unwrap( ) . to_string( ) ) ;
0 commit comments