mirror of
https://github.com/spf13/cobra
synced 2025-05-05 21:07:24 +00:00
test: cleanup for go vet
Looks like copy'pasta and an unused variable Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
d99d0713f1
commit
d8271a7c29
1 changed files with 2 additions and 3 deletions
|
@ -916,15 +916,14 @@ func TestRootUnknownCommand(t *testing.T) {
|
||||||
|
|
||||||
func TestRootUnknownCommandSilenced(t *testing.T) {
|
func TestRootUnknownCommandSilenced(t *testing.T) {
|
||||||
r := noRRSetupTestSilenced("bogus")
|
r := noRRSetupTestSilenced("bogus")
|
||||||
s := "Run 'cobra-test --help' for usage.\n"
|
|
||||||
|
|
||||||
if r.Output != "" {
|
if r.Output != "" {
|
||||||
t.Errorf("Unexpected response.\nExpecting to be: \n\"\"\n Got:\n %q\n", s, r.Output)
|
t.Errorf("Unexpected response.\nExpecting to be: \n\"\"\n Got:\n %q\n", r.Output)
|
||||||
}
|
}
|
||||||
|
|
||||||
r = noRRSetupTestSilenced("--strtwo=a bogus")
|
r = noRRSetupTestSilenced("--strtwo=a bogus")
|
||||||
if r.Output != "" {
|
if r.Output != "" {
|
||||||
t.Errorf("Unexpected response.\nExpecting to be:\n\"\"\nGot:\n %q\n", s, r.Output)
|
t.Errorf("Unexpected response.\nExpecting to be:\n\"\"\nGot:\n %q\n", r.Output)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue