Skip to content

Commit ebbf83f

Browse files
committed
Fix tests for COMMANDS section in generated man page
1 parent 4ae5ade commit ebbf83f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/man_docs_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func TestGenManCommands(t *testing.T) {
203203
output := buf.String()
204204

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

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

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

221221
// Time command as echo's subcommand

0 commit comments

Comments
 (0)