Better error message
Calling `cobra-test echo times one two turkey` where `one` and `two` are valid arguments but `turkey` is not now results in. Error: invalid argument "turkey" for "cobra-test echo times" Run 'cobra-test echo times --help' for usage.
This commit is contained in:
@ -768,7 +768,7 @@ func TestRootNoCommandHelp(t *testing.T) {
|
||||
|
||||
func TestRootUnknownCommand(t *testing.T) {
|
||||
r := noRRSetupTest("bogus")
|
||||
s := "Error: unknown command \"bogus\"\nRun 'cobra-test --help' for usage.\n"
|
||||
s := "Error: unknown command \"bogus\" for \"cobra-test\"\nRun 'cobra-test --help' for usage.\n"
|
||||
|
||||
if r.Output != s {
|
||||
t.Errorf("Unexpected response.\nExpecting to be:\n %q\nGot:\n %q\n", s, r.Output)
|
||||
|
Reference in New Issue
Block a user