@@ -17,27 +17,25 @@ void main() {
1717 'some_other_command' : 'This is help for some_other_command' ,
1818 '--help' : 'Print this usage information.' ,
1919 '--rootFlag' : r'A flag\: in the root command' ,
20+ '--rootOption' : null ,
2021 };
2122
2223 testCompletion (
2324 'basic usage' ,
2425 forLine: 'example_cli' ,
2526 suggests: allRootOptionsAndSubcommands,
26- skip: notImplemmentedYet,
2727 );
2828
2929 testCompletion (
3030 'leading whitespaces' ,
3131 forLine: ' example_cli' ,
3232 suggests: allRootOptionsAndSubcommands,
33- skip: notImplemmentedYet,
3433 );
3534
3635 testCompletion (
3736 'trailing whitespaces' ,
3837 forLine: 'example_cli ' ,
3938 suggests: allRootOptionsAndSubcommands,
40- skip: notImplemmentedYet,
4139 );
4240 });
4341
@@ -49,6 +47,7 @@ void main() {
4947 suggests: {
5048 '--help' : 'Print this usage information.' ,
5149 '--rootFlag' : r'A flag\: in the root command' ,
50+ '--rootOption' : null ,
5251 },
5352 skip: notImplemmentedYet,
5453 );
@@ -58,6 +57,7 @@ void main() {
5857 forLine: 'example_cli --r' ,
5958 suggests: {
6059 '--rootFlag' : r'A flag\: in the root command' ,
60+ '--rootOption' : null ,
6161 },
6262 skip: notImplemmentedYet,
6363 );
@@ -67,6 +67,7 @@ void main() {
6767 forLine: 'example_cli -h --r' ,
6868 suggests: {
6969 '--rootFlag' : r'A flag\: in the root command' ,
70+ '--rootOption' : null ,
7071 },
7172 skip: notImplemmentedYet,
7273 );
@@ -108,7 +109,6 @@ void main() {
108109 'some_command' : 'This is help for some_command' ,
109110 'some_other_command' : 'This is help for some_other_command' ,
110111 },
111- skip: notImplemmentedYet,
112112 );
113113
114114 testCompletion (
@@ -118,7 +118,6 @@ void main() {
118118 'some_command' : 'This is help for some_command' ,
119119 'some_other_command' : 'This is help for some_other_command' ,
120120 },
121- skip: notImplemmentedYet,
122121 );
123122
124123 testCompletion (
@@ -127,7 +126,6 @@ void main() {
127126 suggests: {
128127 'some_command' : 'This is help for some_command' ,
129128 },
130- skip: notImplemmentedYet,
131129 );
132130 });
133131
@@ -138,7 +136,6 @@ void main() {
138136 suggests: {
139137 'melon' : 'This is help for some_command' ,
140138 },
141- skip: notImplemmentedYet,
142139 );
143140
144141 testCompletion (
@@ -147,7 +144,6 @@ void main() {
147144 suggests: {
148145 r'disguised\:some_commmand' : 'This is help for some_command' ,
149146 },
150- skip: notImplemmentedYet,
151147 );
152148 });
153149
@@ -172,55 +168,50 @@ void main() {
172168 '--continuous' : r'A continuous option\: any value is allowed' ,
173169 '--multi-d' : 'An discrete option that can be passed multiple times ' ,
174170 '--multi-c' : 'An continuous option that can be passed multiple times' ,
175- '--flag' : '' ,
171+ '--flag' : null ,
176172 '--inverseflag' : 'A flag that the default value is true' ,
177173 '--trueflag' : 'A flag that cannot be negated'
178174 };
179175
180- final allAbbreviationssInThisLevel = < String , String > {
176+ final allAbbreviationssInThisLevel = < String , String ? > {
181177 '-h' : 'Print this usage information.' ,
182178 '-d' : 'A discrete option with "allowed" values (mandatory)' ,
183179 '-m' : 'An discrete option that can be passed multiple times ' ,
184180 '-n' : 'An continuous option that can be passed multiple times' ,
185- '-f' : '' ,
181+ '-f' : null ,
186182 '-i' : 'A flag that the default value is true' ,
187183 '-t' : 'A flag that cannot be negated'
188184 };
189185
190- group ('empty' , () {
186+ group ('empty ' , () {
191187 testCompletion (
192188 'basic usage' ,
193189 forLine: 'example_cli some_command' ,
194190 suggests: allOptionsInThisLevel,
195- skip: notImplemmentedYet,
196191 );
197192
198193 testCompletion (
199194 'leading spaces' ,
200195 forLine: ' example_cli some_command' ,
201196 suggests: allOptionsInThisLevel,
202- skip: notImplemmentedYet,
203197 );
204198
205199 testCompletion (
206200 'trailing spaces' ,
207201 forLine: 'example_cli some_command ' ,
208202 suggests: allOptionsInThisLevel,
209- skip: notImplemmentedYet,
210203 );
211204
212205 testCompletion (
213206 'options in between' ,
214- forLine: 'example_cli -f some_command' ,
207+ forLine: 'example_cli -f --rootOption yay some_command' ,
215208 suggests: allOptionsInThisLevel,
216- skip: notImplemmentedYet,
217209 );
218210
219211 testCompletion (
220212 'lots of spaces in between' ,
221213 forLine: 'example_cli some_command' ,
222214 suggests: allOptionsInThisLevel,
223- skip: notImplemmentedYet,
224215 );
225216 });
226217
@@ -229,14 +220,12 @@ void main() {
229220 'shows same options for alias sub command' ,
230221 forLine: 'example_cli melon' ,
231222 suggests: allOptionsInThisLevel,
232- skip: notImplemmentedYet,
233223 );
234224
235225 testCompletion (
236226 'shows same options for alias sub command 2' ,
237227 forLine: 'example_cli disguised:some_commmand' ,
238228 suggests: allOptionsInThisLevel,
239- skip: notImplemmentedYet,
240229 );
241230 });
242231
@@ -470,19 +459,19 @@ void main() {
470459 'subcommand' : 'A sub command of some_other_command' ,
471460 '--help' : 'Print this usage information.' ,
472461 },
473- skip: notImplemmentedYet,
474462 );
475463 });
464+
476465 group ('partially written sub command' , () {
477466 testCompletion (
478467 'partially written sub command' ,
479468 forLine: 'example_cli some_other_command sub' ,
480469 suggests: {
481470 'subcommand' : 'A sub command of some_other_command' ,
482471 },
483- skip: notImplemmentedYet,
484472 );
485473 });
474+
486475 group ('subcommand' , () {
487476 final allOptionsInThisLevel = < String , String ? > {
488477 '--help' : 'Print this usage information.' ,
@@ -516,7 +505,6 @@ void main() {
516505 'basic usage with args in between' ,
517506 forLine: 'example_cli some_other_command subcommand_alias' ,
518507 suggests: allOptionsInThisLevel,
519- skip: notImplemmentedYet,
520508 );
521509 });
522510 });
0 commit comments