SF.net SVN: docutils:[9592 ] trunk/sandbox/manpage-wri ter

grubert--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 9592
          http://sourceforge.net/p/docutils/code/9592
Author:   grubert
Date:     2024-03-25 21:55:34 +0000 (Mon, 25 Mar 2024)
Log Message:
-----------
add regression for URUE problem

Modified Paths:
--------------
    trunk/sandbox/manpage-writer/URUE-problem.txt

Added Paths:
-----------
    trunk/sandbox/manpage-writer/expected/URUE-problem.ascii
    trunk/sandbox/manpage-writer/expected/URUE-problem.html
    trunk/sandbox/manpage-writer/expected/URUE-problem.ps
    trunk/sandbox/manpage-writer/expected/URUE-problem.utf8
    trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.html
    trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.ps
    trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.utf8
    trunk/sandbox/manpage-writer/input/URUE-problem.man
    trunk/sandbox/manpage-writer/runtest-man

Modified: trunk/sandbox/manpage-writer/URUE-problem.txt
===================================================================
--- trunk/sandbox/manpage-writer/URUE-problem.txt	2024-03-25 13:17:25 UTC (rev 9591)
+++ trunk/sandbox/manpage-writer/URUE-problem.txt	2024-03-25 21:55:34 UTC (rev 9592)
@@ -23,6 +23,19 @@
               hyperlinked to the URL; if there is no link text, the URL is printed as 
               its own link text.
 
+man 1 man states ::
+
+       -t, --troff
+              Use  groff  -mandoc  to format the manual page to stdout.  This option is
+              not required in conjunction with -H, -T, or -Z.
+
+       -T[device], --troff-device[=device]
+              This option is used to change groff (or possibly troff’s)  output  to  be
+              suitable  for  a device other than the default.  It implies -t.  Examples
+              (provided with Groff‐1.17) include dvi, latin1, ps, utf8, X75 and X100.
+
+
+
 examples
 ========
 
@@ -47,7 +60,8 @@
 
   or read
 
-html and ps also do not contain an url.
+Specifying the device with ``man -Thtml ./URUE.man``
+html, utf8 and ps also do not contain an url.
 
 mandoc
 ------

Added: trunk/sandbox/manpage-writer/expected/URUE-problem.ascii
===================================================================
--- trunk/sandbox/manpage-writer/expected/URUE-problem.ascii	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected/URUE-problem.ascii	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,66 @@
+go to the python home page to read
+
+or read
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: trunk/sandbox/manpage-writer/expected/URUE-problem.html
===================================================================
--- trunk/sandbox/manpage-writer/expected/URUE-problem.html	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected/URUE-problem.html	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,28 @@
+<!-- Creator     : groff version 1.23.0 -->
+<!-- CreationDate: Mon Mar 25 10:27:33 2024 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
+       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
+       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
+       h1      { text-align: center }
+</style>
+<title></title>
+</head>
+<body>
+
+<hr>
+
+
+<p>go to the python home page to read</p>
+
+<p style="margin-top: 1em">or read</p>
+<hr>
+</body>
+</html>


Property changes on: trunk/sandbox/manpage-writer/expected/URUE-problem.html
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: trunk/sandbox/manpage-writer/expected/URUE-problem.ps
===================================================================
--- trunk/sandbox/manpage-writer/expected/URUE-problem.ps	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected/URUE-problem.ps	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,268 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.23.0
+%%CreationDate: Mon Mar 25 10:27:33 2024
+%%DocumentNeededResources: font Times-Roman
+%%DocumentSuppliedResources: procset grops 1.23 0
+%%Pages: 1
+%%PageOrder: Ascend
+%%DocumentMedia: Default 595 842 0 () ()
+%%Orientation: Portrait
+%%EndComments
+%%BeginDefaults
+%%PageMedia: Default
+%%EndDefaults
+%%BeginProlog
+%%BeginResource: procset grops 1.23 0
+%!PS-Adobe-3.0 Resource-ProcSet
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+% The ASCII code of the space character.
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+% name size font SF -
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+% name a c d font MF -
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll % b
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+% Enable manual feed.
+% MANUAL -
+/MANUAL{
+statusdict begin/manualfeed true store end
+}bind def
+% Guess the page length.
+% This assumes that the imageable area is vertically centered on the page.
+% PLG - length
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+% BP -
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+DEFS/BPhook known{DEFS begin BPhook end}if
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}def
+% centerx centery radius startangle endangle DA -
+/DA{
+newpath arcn stroke
+}bind def
+% x y SN - x' y'
+% round a position to nearest (pixel + (.25,.25))
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+% endx endy startx starty DL -
+% we round the endpoints of the line, so that parallel horizontal
+% and vertical lines will appear even
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+% centerx centery radius DC -
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+%  width height centerx centery DE -
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+% these are for splines
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+% fill the last path
+% r g b Fr -
+/Fr{
+setrgbcolor fill
+}bind def
+% c m y k Fk -
+/setcmykcolor where{
+pop
+/Fk{
+setcmykcolor fill
+}bind def
+}if
+% g Fg -
+/Fg{
+setgray fill
+}bind def
+% fill with the "current color"
+/FL/fill load def
+/LW/setlinewidth load def
+/Cr/setrgbcolor load def
+/setcmykcolor where{
+pop
+/Ck/setcmykcolor load def
+}if
+/Cg/setgray load def
+% new_font_name encoding_vector old_font_name RE -
+/RE{
+findfont
+dup maxlength 1 index/FontName known not{1 add}if dict begin
+{
+1 index/FID ne
+2 index/UniqueID ne
+and
+{def}{pop pop}ifelse
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+% hpos vpos EBEGIN -
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+% llx lly newwid wid newht ht newllx newlly PBEGIN -
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+% set the graphics state to default values
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+%
+%  Any included setpagedevice should be ignored.
+%  See: http://www.w-beer.de/doc/ps/.
+%
+/setpagedevice{}def
+mark
+}bind def
+/PEND{
+cleartomark
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Default
+<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
+%%EndFeature
+%%IncludeResource: font Times-Roman
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
+def/PL PLG def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
+/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
+/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/Times-Roman@0 ENC0/Times-Roman RE
+%%EndSetup
+%%Page: 1 1
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(go to the p)72 12 Q(ython home page to read)-.1
+E(or read)72 36 Q 0 Cg EP
+%%Trailer
+end
+%%EOF

Added: trunk/sandbox/manpage-writer/expected/URUE-problem.utf8
===================================================================
--- trunk/sandbox/manpage-writer/expected/URUE-problem.utf8	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected/URUE-problem.utf8	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,66 @@
+go to the python home page to read
+
+or read
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Added: trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.html
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.html	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.html	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8"/>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+  <style>
+    table.head, table.foot { width: 100%; }
+    td.head-rtitle, td.foot-os { text-align: right; }
+    td.head-vol { text-align: center; }
+    .Nd, .Bf, .Op { display: inline; }
+    .Pa, .Ad { font-style: italic; }
+    .Ms { font-weight: bold; }
+    .Bl-diag > dt { font-weight: bold; }
+    code.Nm, .Fl, .Cm, .Ic, code.In, .Fd, .Fn, .Cd { font-weight: bold;
+      font-family: inherit; }
+  </style>
+  <title>()</title>
+</head>
+<body>
+<table class="head">
+  <tr>
+    <td class="head-ltitle">()</td>
+    <td class="head-vol"></td>
+    <td class="head-rtitle">()</td>
+  </tr>
+</table>
+<div class="manual-text">go to the
+  <a class="Lk" href="http://www.python.org">python home page</a> to read
+<p class="Pp">or read
+    <a class="Lk" href="http://www.python.org">http://www.python.org</a></p>
+</div>
+<table class="foot">
+  <tr>
+    <td class="foot-date"></td>
+    <td class="foot-os"></td>
+  </tr>
+</table>
+</body>
+</html>


Property changes on: trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.html
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.ps
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.ps	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.ps	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,44 @@
+%!PS-Adobe-3.0
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%Pages: (atend)
+%%PageOrder: Ascend
+%%DocumentMedia: man-Letter 612 790 0 () ()
+%%DocumentNeededResources: font Times-Roman Times-Bold Times-Italic Times-BoldItalic
+%%DocumentSuppliedResources: procset MandocProcs 1.0 0
+%%EndComments
+%%BeginProlog
+%%BeginResource: procset MandocProcs 10170 10170
+/fs 11 def
+/f0 { /Times-Roman fs selectfont } def
+/f1 { /Times-Bold fs selectfont } def
+/f2 { /Times-Italic fs selectfont } def
+/f3 { /Times-BoldItalic fs selectfont } def
+/s { 3 1 roll moveto show } bind def
+/c { exch currentpoint exch pop moveto show } bind def
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Letter
+<</PageSize [612 790]>>setpagedevice
+%%EndFeature
+%%EndSetup
+%%Page: 1 1
+f0
+68.024 702.988(go)s
+81.774(to)c
+93.082(the)c
+109.274(python)c
+142.582(home)c
+169.774(page)c
+193.292(<http://www.python.org>)c
+309.287(to)c
+320.595(read)c
+f0
+68.024 739.233(\(\))s
+536.932(\(\))c
+536.932 36.245(\(\))s
+showpage
+%%Trailer
+%%Pages: 1
+%%EOF

Added: trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.utf8
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.utf8	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected-mandoc/URUE-problem.utf8	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,7 @@
+()                                                                          ()
+
+go to the python home page <http://www.python.org> to read
+
+or read <http://www.python.org>
+
+                                                                            ()

Added: trunk/sandbox/manpage-writer/input/URUE-problem.man
===================================================================
--- trunk/sandbox/manpage-writer/input/URUE-problem.man	                        (rev 0)
+++ trunk/sandbox/manpage-writer/input/URUE-problem.man	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,9 @@
+go to the
+.UR http://www.python.org
+python home page
+.UE
+to read
+
+or read
+.UR http://www.python.org
+.UE

Added: trunk/sandbox/manpage-writer/runtest-man
===================================================================
--- trunk/sandbox/manpage-writer/runtest-man	                        (rev 0)
+++ trunk/sandbox/manpage-writer/runtest-man	2024-03-25 21:55:34 UTC (rev 9592)
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+# manpage tests using man/roff
+#
+# Contact: [email protected]
+# Revision: $Revision: 9570 $
+# Date: $Date: 2024-03-15 16:42:21 +0100 (Fr, 15. Mär 2024) $
+# Copyright: This script has been placed in the public domain.
+
+IN_DIR=input
+OUT_DIR=output
+EXP_DIR=expected
+
+if [ -z "`man -?|grep -- '^ *-T'`" ] ; then
+    echo 'WARNING: your man does not support "-T Format" to specify encoding'
+    echo 'SKIPPING encoding tests'
+    ENCS=""
+    GROFF="ps"
+else
+    ENCS="latin1 utf8 ascii ps html"
+    GROFF=""
+fi
+
+if [ -z "$1" ] ; then
+  FILES=*.man
+else
+  FILES=$1
+fi
+
+ERROR_CNT=0
+
+inc_ERROR_CNT () {
+    ERROR_CNT=$(( ERROR_CNT + 1 ))
+}
+
+report_ERROR_CNT () {
+	echo "$ERROR_CNT errors"
+}
+
+for CMD in man mandoc ; do
+  if [ "mandoc" = $CMD ] ; then
+    OUT_DIR=output-mandoc
+    EXP_DIR=expected-mandoc
+  else 
+    OUT_DIR=output
+    EXP_DIR=expected
+  fi
+  for IN_F in $IN_DIR/$FILES ; do
+    BASE=`basename $IN_F`
+    F_BASE=${BASE%.man}
+
+    for ENC in $ENCS ; do
+      if [ -e $EXP_DIR/$F_BASE.$ENC ] ; then
+        $CMD -T$ENC $IN_F > $OUT_DIR/$F_BASE.$ENC
+        diff -s -u $EXP_DIR/$F_BASE.$ENC $OUT_DIR/$F_BASE.$ENC
+        if [ $? -ne 0 ] ; then
+          inc_ERROR_CNT
+        fi
+      fi
+    done
+    for ENC in $GROFF ; do
+      if [ -e $EXP_DIR/$F_BASE.groff.$ENC ] ; then
+        # macosx -t means troff means gross -Tps
+        $CMD -t  IN_Fn > $OUT_DIR/$F_BASE.groff.$ENC
+        diff -s -u $EXP_DIR/$F_BASE.groff.$ENC $OUT_DIR/$F_BASE.groff.$ENC
+        if [ $? -ne 0 ] ; then
+          inc_ERROR_CNT
+        fi
+      fi
+    done
+  done
+done
+
+report_ERROR_CNT
+


Property changes on: trunk/sandbox/manpage-writer/runtest-man
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



_______________________________________________
Docutils-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
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.