File tree 1 file changed +27
-0
lines changed
cmd/cue/cmd/testdata/script
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,39 @@ cmp stderr unknown_cmd.out
6
6
! stdout .
7
7
cmp stderr unknown_flag.out
8
8
9
+ ! exec cue unknown --unknown
10
+ ! stdout .
11
+ cmp stderr unknown_cmd.out
12
+
13
+ ! exec cue mod unknown
14
+ ! stdout .
15
+ cmp stderr unknown_mod_cmd.out
16
+
17
+ ! exec cue mod --unknown
18
+ ! stdout .
19
+ cmp stderr unknown_flag.out
20
+
21
+ # TODO: this should result in an "unknown subcommand" error.
22
+ ! exec cue mod unknown --unknown
23
+ ! stdout .
24
+ cmp stderr unknown_flag.out
25
+
26
+ # A rather convoluted edge case, but Cobra allows mixing flags with args,
27
+ # even when the args are subcommand names. -v and -E are global flags.
28
+ # TODO: this should result in an "unknown subcommand" error.
29
+ ! exec cue -v mod -E unknown --unknown
30
+ ! stdout .
31
+ cmp stderr unknown_flag.out
32
+
9
33
! exec cue evla
10
34
! stdout .
11
35
cmp stderr typo_cmd.stdout
12
36
13
37
-- unknown_cmd.out --
14
38
unknown command "unknown" for "cue"
39
+ -- unknown_mod_cmd.out --
40
+ mod must be run as one of its subcommands: unknown subcommand "unknown"
41
+ Run 'cue help mod' for known subcommands.
15
42
-- unknown_flag.out --
16
43
unknown flag: --unknown
17
44
-- typo_cmd.stdout --
You can’t perform that action at this time.
0 commit comments