SF.net SVN: docutils:[9689 ] trunk/docutils/test/test _writers/test_manpage.py

milde--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 9689
          http://sourceforge.net/p/docutils/code/9689
Author:   milde
Date:     2024-05-06 08:32:22 +0000 (Mon, 06 May 2024)
Log Message:
-----------
Mask trailing whitespace in test sample.

Use Python string-escapes (`` \n\``) to mask a trailing whitespace in a
"manpage" writer output sample.

-1 one cannot use raw strings and must escape all literal backslashs.
+1 allows removing all trailing whitespace with a simple script
   to avoid spurious whitespace in the repository.

Modified Paths:
--------------
    trunk/docutils/test/test_writers/test_manpage.py

Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py	2024-05-06 07:55:24 UTC (rev 9688)
+++ trunk/docutils/test/test_writers/test_manpage.py	2024-05-06 08:32:22 UTC (rev 9689)
@@ -165,9 +165,10 @@
 """,
         r""".\" Man page generated from reStructuredText.
 .
-""" + indend_macros + r""".TH "SIMPLE" "1" "2009-08-05" "0.1" "text processing"
+""" + indend_macros + """\
+.TH "SIMPLE" "1" "2009-08-05" "0.1" "text processing"
 .SH NAME
-simple \- The way to go
+simple \\- The way to go
 .SH SYNOPSIS
 .INDENT 0.0
 .INDENT 3.5
@@ -183,29 +184,29 @@
 .SH OPTIONS
 .INDENT 0.0
 .TP
-.BI \-\-config\fB= <file>
+.BI \\-\\-config\\fB= <file>
 Read configuration settings from <file>, if it exists.
 .TP
-.B  \-\-version\fP,\fB  \-V
-Show this program\(aqs version number and exit.
+.B  \\-\\-version\\fP,\\fB  \\-V
+Show this program\\(aqs version number and exit.
 .TP
-.B  \-\-help\fP,\fB  \-h
+.B  \\-\\-help\\fP,\\fB  \\-h
 Show this help message and exit.
 .UNINDENT
 .SH OTHER SECTION
 .sp
-link to  <http://docutils.sourceforge.io> 
+link to  <http://docutils.sourceforge.io> \n\
 .sp
 With mixed case.
 .sp
-\fBATTENTION!:\fP
+\\fBATTENTION!:\\fP
 .INDENT 0.0
 .INDENT 3.5
 Admonition with title
 .INDENT 0.0
-.IP \(bu 2
+.IP \\(bu 2
 bullet list
-.IP \(bu 2
+.IP \\(bu 2
 bull and list
 .UNINDENT
 .UNINDENT
@@ -218,10 +219,10 @@
 .UNINDENT
 .UNINDENT
 .sp
-\&. period at line start.
+\\&. period at line start.
 .sp
 and . in a line and at line start
-\&.in a paragraph
+\\&.in a paragraph
 .SH AUTHOR
 [email protected]
 
@@ -228,7 +229,7 @@
 Arbitrary field: some text
 .SH COPYRIGHT
 public domain
-.\" Generated by docutils manpage writer.
+.\\" Generated by docutils manpage writer.
 .
 """],
 ]

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.