Improve vendoring options by removing self-referential imports in tests.

This commit is contained in:
Edward Sheffler III
2015-07-20 12:18:25 -07:00
committed by Edward Sheffler III
parent bca61c476e
commit 8ea1232ede
7 changed files with 319 additions and 331 deletions

View File

@@ -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:")