source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Slowly start doing more HTML output tests, in this case for the
Date: Sat, 5 Jan 2019 15:05:20 -0500 (EST)	[thread overview]
Message-ID: <05f9abcb23284525@fantadrom.bsd.lv> (raw)

Log Message:
-----------
Slowly start doing more HTML output tests, in this case for the
interaction of .nf and .RS, related to man_macro.c rev. 1.106.

HTML regression testing is tricky because it is extremely prone to
over-testing, i.e. unintentional testing for volatile formatting
details which are irrelevant for deciding whether the HTML output
is good or bad.  Minor changes to the formatter - which is still
heavily under development - might result in the necessity to
repeatedly adjust many test cases.

Then again, HTML syntax rules are so complicated that without
regression testing, the risk is simply too high that later changes
will re-introduce issues that were already fixed earlier.  Let's
just try to design the tests very carefully in such a way that
the *.out_html files contain nothing that is likely to change, and
defer testing in cases where the HTML output is not yet clean enough
to allow designing tests in such a way.

Modified Files:
--------------
    mandoc/regress/man/RS:
        Makefile
        literal.in
        literal.out_ascii

Added Files:
-----------
    mandoc/regress/man/RS:
        literal.out_html

Revision Data
-------------
Index: literal.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/RS/literal.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/RS/literal.in -Lregress/man/RS/literal.in -u -p -r1.2 -r1.3
--- regress/man/RS/literal.in
+++ regress/man/RS/literal.in
@@ -1,19 +1,27 @@
-.\" $OpenBSD: literal.in,v 1.2 2017/07/04 14:53:23 schwarze Exp $
-.TH RS-LITERAL 1 "January 5, 2013"
+.\" $OpenBSD: literal.in,v 1.3 2019/01/05 20:00:33 schwarze Exp $
+.TH RS-LITERAL 1 "January 5, 2019"
 .SH NAME
 RS-literal \- indented literal text
 .SH DESCRIPTION
+BEGINTEST
+.br
+initial
 regular
 text
 .nf
-literal
-text
+literal text
+before display
 .RS
 This is a short line.
 This is a very long line that would wrap if it weren't in literal context.
 .RE
-.PP
 literal text
+after display
 .fi
+final
 regular
 text
+.br
+ENDTEST
+.br
+end of file
--- /dev/null
+++ regress/man/RS/literal.out_html
@@ -0,0 +1,20 @@
+BEGINTEST
+<br/>
+initial regular text
+<pre>
+literal text
+before display
+</pre>
+<div class="Bd-indent">
+<pre>
+This is a short line.
+This is a very long line that would wrap if it weren't in literal context.
+</pre>
+</div>
+<pre>
+literal text
+after display
+</pre>
+final regular text
+<br/>
+ENDTEST
Index: Makefile
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/RS/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/RS/Makefile -Lregress/man/RS/Makefile -u -p -r1.2 -r1.3
--- regress/man/RS/Makefile
+++ regress/man/RS/Makefile
@@ -1,7 +1,8 @@
-# $OpenBSD: Makefile,v 1.11 2015/04/06 13:34:54 schwarze Exp $
+# $OpenBSD: Makefile,v 1.13 2019/01/05 20:00:33 schwarze Exp $
 
 REGRESS_TARGETS	 = an-margin breaking broken empty literal lonelyRE
 REGRESS_TARGETS	+= nested noRE nowidth REarg width
 LINT_TARGETS	 = empty lonelyRE noRE REarg
+HTML_TARGETS	 = literal
 
 .include <bsd.regress.mk>
Index: literal.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/RS/literal.out_ascii,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/man/RS/literal.out_ascii -Lregress/man/RS/literal.out_ascii -u -p -r1.1 -r1.2
--- regress/man/RS/literal.out_ascii
+++ regress/man/RS/literal.out_ascii
@@ -6,15 +6,18 @@ N\bNA\bAM\bME\bE
        RS-literal - indented literal text
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       regular text
-       literal
-       text
+       BEGINTEST
+       initial regular text
+       literal text
+       before display
               This is a short line.
               This is a very long line that would wrap if it weren't in literal context.
-
        literal text
-       regular text
+       after display
+       final regular text
+       ENDTEST
+       end of file
 
 
 
-OpenBSD                         January 5, 2013                  RS-LITERAL(1)
+OpenBSD                         January 5, 2019                  RS-LITERAL(1)
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2019-01-05 20:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05f9abcb23284525@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).