|
|
|
@ -1423,7 +1423,7 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for _, flagSet := range subcommandHelpTopics {
|
|
|
|
|
log.Printf("==> checking with flags %v", flagSet)
|
|
|
|
|
t.Logf("==> checking with flags %v", flagSet)
|
|
|
|
|
|
|
|
|
|
app := &App{}
|
|
|
|
|
buf := new(bytes.Buffer)
|
|
|
|
@ -1613,7 +1613,7 @@ func TestApp_Run_Help(t *testing.T) {
|
|
|
|
|
for _, args := range helpArguments {
|
|
|
|
|
buf := new(bytes.Buffer)
|
|
|
|
|
|
|
|
|
|
log.Printf("==> checking with arguments %v", args)
|
|
|
|
|
t.Logf("==> checking with arguments %v", args)
|
|
|
|
|
|
|
|
|
|
app := &App{
|
|
|
|
|
Name: "boom",
|
|
|
|
@ -1631,7 +1631,7 @@ func TestApp_Run_Help(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output := buf.String()
|
|
|
|
|
log.Printf("output: %q\n", buf.Bytes())
|
|
|
|
|
t.Logf("output: %q\n", buf.Bytes())
|
|
|
|
|
|
|
|
|
|
if !strings.Contains(output, "boom - make an explosive entrance") {
|
|
|
|
|
t.Errorf("want help to contain %q, did not: \n%q", "boom - make an explosive entrance", output)
|
|
|
|
@ -1645,7 +1645,7 @@ func TestApp_Run_Version(t *testing.T) {
|
|
|
|
|
for _, args := range versionArguments {
|
|
|
|
|
buf := new(bytes.Buffer)
|
|
|
|
|
|
|
|
|
|
log.Printf("==> checking with arguments %v", args)
|
|
|
|
|
t.Logf("==> checking with arguments %v", args)
|
|
|
|
|
|
|
|
|
|
app := &App{
|
|
|
|
|
Name: "boom",
|
|
|
|
@ -1664,7 +1664,7 @@ func TestApp_Run_Version(t *testing.T) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output := buf.String()
|
|
|
|
|
log.Printf("output: %q\n", buf.Bytes())
|
|
|
|
|
t.Logf("output: %q\n", buf.Bytes())
|
|
|
|
|
|
|
|
|
|
if !strings.Contains(output, "0.1.0") {
|
|
|
|
|
t.Errorf("want version to contain %q, did not: \n%q", "0.1.0", output)
|
|
|
|
|