|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
Packit |
e4b6da |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
Packit |
e4b6da |
<head>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"text/html; charset=us-ascii" />
|
|
Packit |
e4b6da |
<title>docbook2X: How docbook2X is tested</title>
|
|
Packit |
e4b6da |
<link rel="stylesheet" href="docbook2X.css" type="text/css" />
|
|
Packit |
e4b6da |
<link rev="made" href="mailto:stevecheng@users.sourceforge.net" />
|
|
Packit |
e4b6da |
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1" />
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"Discussion of correctness-testing" />
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"docbook2X: Documentation Table of Contents" />
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"docbook2X: Documentation Table of Contents" />
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"docbook2X: Performance analysis" />
|
|
Packit |
e4b6da |
<link rel="next" href="todo.html" title="docbook2X: To-do list" />
|
|
Packit |
e4b6da |
</head>
|
|
Packit |
e4b6da |
<body>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
How docbook2X is tested
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"performance.html"><< Previous
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"todo.html">Next >>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
How docbook2X
|
|
Packit |
e4b6da |
is tested
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"id2540814" class="indexterm" name="id2540814">
|
|
Packit |
e4b6da |
"id2540820" class="indexterm" name="id2540820">
|
|
Packit |
e4b6da |
The testing of the process of converting from DocBook to man
|
|
Packit |
e4b6da |
pages, or Texinfo, is complicated by the fact that a given input
|
|
Packit |
e4b6da |
(the DocBook document) usually does not have one specific,
|
|
Packit |
e4b6da |
well-defined output. Variations on the output are allowed for the
|
|
Packit |
e4b6da |
result to look “nice”.
|
|
Packit |
e4b6da |
When docbook2X was in the early stages of development, the
|
|
Packit |
e4b6da |
author tested it simply by running some sample DocBook documents
|
|
Packit |
e4b6da |
through it, and visually inspecting the output.
|
|
Packit |
e4b6da |
Clearly, this procedure is not scaleable for testing a large
|
|
Packit |
e4b6da |
number of documents. In the later 0.8.
|
|
Packit |
e4b6da |
"replaceable">x versions of docbook2X, the
|
|
Packit |
e4b6da |
testing has been automated as much as possible.
|
|
Packit |
e4b6da |
The testing is implemented by heuristic checks on the output to
|
|
Packit |
e4b6da |
see if it comprises a “good” man page or Texinfo file.
|
|
Packit |
e4b6da |
These are the checks in particular:
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
Validation of the Man-XML or Texi-XML output, from the first
|
|
Packit |
e4b6da |
stage, XSLT stylesheets, against the XML DTDs defining the
|
|
Packit |
e4b6da |
formats.
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
Running
|
|
Packit |
e4b6da |
"refentrytitle">
|
|
Packit |
e4b6da |
"command">groff and
|
|
Packit |
e4b6da |
"citerefentry">
|
|
Packit |
e4b6da |
"command">makeinfo on the output, and
|
|
Packit |
e4b6da |
noting any errors or warnings from those programs.
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
Other heuristic checks on the output, implemented by a Perl
|
|
Packit |
e4b6da |
script. Here, spurious blank lines, uncollapsed whitespace in the
|
|
Packit |
e4b6da |
output that would cause a bad display are checked.
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
There are about 8000 test documents, mostly
|
|
Packit |
e4b6da |
"sgmltag-element">refentry documents, that can be run
|
|
Packit |
e4b6da |
against the current version of docbook2X. A few of them have been
|
|
Packit |
e4b6da |
gathered by the author from various sources and test cases from bug
|
|
Packit |
e4b6da |
reports. The majority come from using
|
|
Packit |
e4b6da |
"http://www.catb.org/~esr/doclifter/" target="_top">doclifter
|
|
Packit |
e4b6da |
on existing man pages. Most pages pass the above tests.
|
|
Packit |
e4b6da |
To run the tests, go to the test/
|
|
Packit |
e4b6da |
directory in the docbook2X distribution. The command
|
|
Packit |
e4b6da |
"userinput">make check will run some tests on
|
|
Packit |
e4b6da |
a few documents.
|
|
Packit |
e4b6da |
For testing using doclifter, first generate the DocBook XML
|
|
Packit |
e4b6da |
sources using doclifter, then take a look at the
|
|
Packit |
e4b6da |
"filename">test/mass/test.pl testing script and run it. Note
|
|
Packit |
e4b6da |
that a small portion of the doclifter pages will fail the tests,
|
|
Packit |
e4b6da |
because they do not satisfy the heuristic tests (but are otherwise
|
|
Packit |
e4b6da |
correct), or, more commonly, the source coming from the doclifter
|
|
Packit |
e4b6da |
heuristic up-conversion has errors.
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"performance.html"><< Previous
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"todo.html">Next >>
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
Performance
|
|
Packit |
e4b6da |
analysis
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"docbook2X.html">Table of Contents
|
|
Packit |
e4b6da |
To-do list
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
|
|
Packit |
e4b6da |
"http://docbook2x.sourceforge.net/" title=
|
|
Packit |
e4b6da |
"docbook2X: Home page">docbook2X home page
|
|
Packit |
e4b6da |
</body>
|
|
Packit |
e4b6da |
</html>
|