Improve vendoring options by removing self-referential imports in tests.
This commit is contained in:
committed by
Edward Sheffler III
parent
bca61c476e
commit
8ea1232ede
16
help_test.go
16
help_test.go
@@ -1,20 +1,18 @@
|
||||
package cli_test
|
||||
package cli
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/codegangsta/cli"
|
||||
)
|
||||
|
||||
func Test_ShowAppHelp_NoAuthor(t *testing.T) {
|
||||
output := new(bytes.Buffer)
|
||||
app := cli.NewApp()
|
||||
app := NewApp()
|
||||
app.Writer = output
|
||||
|
||||
c := cli.NewContext(app, nil, nil)
|
||||
c := NewContext(app, nil, nil)
|
||||
|
||||
cli.ShowAppHelp(c)
|
||||
ShowAppHelp(c)
|
||||
|
||||
if bytes.Index(output.Bytes(), []byte("AUTHOR(S):")) != -1 {
|
||||
t.Errorf("expected\n%snot to include %s", output.String(), "AUTHOR(S):")
|
||||
@@ -23,14 +21,14 @@ func Test_ShowAppHelp_NoAuthor(t *testing.T) {
|
||||
|
||||
func Test_ShowAppHelp_NoVersion(t *testing.T) {
|
||||
output := new(bytes.Buffer)
|
||||
app := cli.NewApp()
|
||||
app := NewApp()
|
||||
app.Writer = output
|
||||
|
||||
app.Version = ""
|
||||
|
||||
c := cli.NewContext(app, nil, nil)
|
||||
c := NewContext(app, nil, nil)
|
||||
|
||||
cli.ShowAppHelp(c)
|
||||
ShowAppHelp(c)
|
||||
|
||||
if bytes.Index(output.Bytes(), []byte("VERSION:")) != -1 {
|
||||
t.Errorf("expected\n%snot to include %s", output.String(), "VERSION:")
|
||||
|
Reference in New Issue
Block a user