Skip to content

Commit

Permalink
Fix tests for COMMANDS section in generated man page
Browse files Browse the repository at this point in the history
  • Loading branch information
hoshsadiq committed Feb 8, 2022
1 parent 4ae5ade commit ebbf83f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/man_docs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func TestGenManCommands(t *testing.T) {
output := buf.String()

checkStringContains(t, output, ".SH COMMANDS")
checkStringMatch(t, output, "\\\\fBecho\\\\fP\n[ \t]+Echo anything to the screen\n[ \t]+See \\\\fBroot\\\\-echo\\(2\\)\\\\fP\\\\&\\.")
checkStringMatch(t, output, "\\\\fBecho\\\\fP\n[ \t]+Echo anything to the screen\n[ \t]+See \\\\fBroot\\-echo\\(2\\)\\\\fP\\\\&\\.")
checkStringOmits(t, output, ".PP\n\\fBprint\\fP\n")

// Echo command
Expand All @@ -214,8 +214,8 @@ func TestGenManCommands(t *testing.T) {
output = buf.String()

checkStringContains(t, output, ".SH COMMANDS")
checkStringMatch(t, output, "\\\\fBtimes\\\\fP\n[ \t]+Echo anything to the screen more times\n[ \t]+See \\\\fBroot\\\\-echo\\\\-times\\(2\\)\\\\fP\\\\&\\.")
checkStringMatch(t, output, "\\\\fBechosub\\\\fP\n[ \t]+second sub command for echo\n[ \t]+See \\\\fBroot\\\\-echo\\\\-echosub\\(2\\)\\\\fP\\\\&\\.")
checkStringMatch(t, output, "\\\\fBtimes\\\\fP\n[ \t]+Echo anything to the screen more times\n[ \t]+See \\\\fBroot\\-echo\\-times\\(2\\)\\\\fP\\\\&\\.")
checkStringMatch(t, output, "\\\\fBechosub\\\\fP\n[ \t]+second sub command for echo\n[ \t]+See \\\\fBroot\\-echo\\-echosub\\(2\\)\\\\fP\\\\&\\.")
checkStringOmits(t, output, ".PP\n\\fBdeprecated\\fP\n")

// Time command as echo's subcommand
Expand Down

0 comments on commit ebbf83f

Please sign in to comment.