Skip to content

Commit

Permalink
cmd/cue: add a test case for a subcommand typo
Browse files Browse the repository at this point in the history
The next commit enables cobra's feature to suggest a command name.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ie9d29bcb72eed7c51c86eb4f6494c3874f3e47f0
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1204873
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
mvdan committed Nov 28, 2024
1 parent 29e0b46 commit 70e5273
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/cue/cmd/testdata/script/unknown_args.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ cmp stderr unknown_cmd.out
! stdout .
cmp stderr unknown_flag.out

! exec cue evla
! stdout .
cmp stderr typo_cmd.stdout

-- unknown_cmd.out --
unknown command "unknown" for "cue"
-- unknown_flag.out --
unknown flag: --unknown
-- typo_cmd.stdout --
unknown command "evla" for "cue"

0 comments on commit 70e5273

Please sign in to comment.