Merge pull request #145 from eparis/man-cleanups

Enhance Man Page Generation
This commit is contained in:
Eric Paris
2015-09-08 18:19:27 -05:00
6 changed files with 139 additions and 47 deletions

View File

@ -265,16 +265,24 @@ func logErr(t *testing.T, found, expected string) {
t.Errorf(out.String())
}
func checkStringContains(t *testing.T, found, expected string) {
if !strings.Contains(found, expected) {
logErr(t, found, expected)
}
}
func checkResultContains(t *testing.T, x resulter, check string) {
if !strings.Contains(x.Output, check) {
logErr(t, x.Output, check)
checkStringContains(t, x.Output, check)
}
func checkStringOmits(t *testing.T, found, expected string) {
if strings.Contains(found, expected) {
logErr(t, found, expected)
}
}
func checkResultOmits(t *testing.T, x resulter, check string) {
if strings.Contains(x.Output, check) {
logErr(t, x.Output, check)
}
checkStringOmits(t, x.Output, check)
}
func checkOutputContains(t *testing.T, c *Command, check string) {