From 063a48797d56923e2aff4ff12ab84aad204d0ca3 Mon Sep 17 00:00:00 2001 From: Alex Flint Date: Fri, 3 Apr 2020 11:52:00 -0400 Subject: [PATCH] clean up extraneous test output --- usage_test.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usage_test.go b/usage_test.go index 905de92..35745f7 100644 --- a/usage_test.go +++ b/usage_test.go @@ -215,9 +215,9 @@ Options: var help bytes.Buffer p.WriteHelp(&help) actual := help.String() - t.Logf("Expected:\n%s", expectedHelp) - t.Logf("Actual:\n%s", actual) if expectedHelp != actual { + t.Logf("Expected:\n%s", expectedHelp) + t.Logf("Actual:\n%s", actual) t.Fail() } } @@ -243,9 +243,9 @@ Options: var help bytes.Buffer p.WriteHelp(&help) actual := help.String() - t.Logf("Expected:\n%s", expectedHelp) - t.Logf("Actual:\n%s", actual) if expectedHelp != actual { + t.Logf("Expected:\n%s", expectedHelp) + t.Logf("Actual:\n%s", actual) t.Fail() } } @@ -271,7 +271,7 @@ Options: assert.Equal(t, expectedHelp, help.String()) } -func TestUsagWithNestedSubcommands(t *testing.T) { +func TestUsageWithNestedSubcommands(t *testing.T) { expectedHelp := `Usage: example child nested [--enable] OUTPUT Positional arguments: @@ -305,6 +305,5 @@ Global options: var help bytes.Buffer p.WriteHelp(&help) - fmt.Println(help.String()) assert.Equal(t, expectedHelp, help.String()) }