summaryrefslogtreecommitdiff
path: root/usage_test.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2020-04-03 12:31:52 -0400
committerGitHub <[email protected]>2020-04-03 12:31:52 -0400
commit854aa644a6897022cab3dc5974bc19f0367f9055 (patch)
tree2bb7c6c26860731a87f65ade08a84017ac2350e9 /usage_test.go
parent6f3675fdf12421b56abafbc514ba723e6e4d696d (diff)
parent1fc1a6f6dfb7a332ea90974acd09dadcdf2c2b11 (diff)
Merge pull request #110 from alexflint/github-actions
Set up CI using github actions
Diffstat (limited to 'usage_test.go')
-rw-r--r--usage_test.go11
1 files 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())
}