fix tests

This commit is contained in:
Tristan Zajonc
2015-08-12 21:43:14 -07:00
parent ecb0b5ac0a
commit aced6e8739
4 changed files with 29 additions and 17 deletions

View File

@@ -90,10 +90,10 @@ func ExampleAppHelp() {
app.Run(os.Args)
// Output:
// NAME:
// describeit - use it to see a description
// greet describeit - use it to see a description
//
// USAGE:
// command describeit [arguments...]
// greet describeit [arguments...]
//
// DESCRIPTION:
// This is how we describe describeit the function
@@ -737,7 +737,7 @@ func TestApp_Run_SubcommandFullPath(t *testing.T) {
app := NewApp()
buf := new(bytes.Buffer)
app.Writer = buf
app.Name = "command"
subCmd := Command{
Name: "bar",
Usage: "does bar things",
@@ -755,7 +755,7 @@ func TestApp_Run_SubcommandFullPath(t *testing.T) {
}
output := buf.String()
if !strings.Contains(output, "foo bar - does bar things") {
if !strings.Contains(output, "command foo bar - does bar things") {
t.Errorf("expected full path to subcommand: %s", output)
}
if !strings.Contains(output, "command foo bar [arguments...]") {