Qstest - Sty Quinscape Unit Test Package
Qstest - Sty Quinscape Unit Test Package
sty
QuinScape Unit Test Package
version 1.7896
David Kastrup
2007/02/21
1 Using qstest
The basic idea of qstest is to let the user specify a number of tests that can be
performed either at package load time or while running a separate test le through
L
A
T
E
X. If you are writing .dtx les, it is a good idea to use Docstrip modules
for specifying which lines are to be used for testing. The le qstest.dtx from
which both the style le as well as this documentation have been generated has
been done in this manner.
Since the following tests should be ignored when the dtx le is compiled itself,
we use this for skipping over the tests:
1 dtx
2 \iffalse
3 /dtx
A standalone test le actually does not need a preamble. We can load the
packages with \RequirePackage and just go ahead. Let us demonstrate how to
build such a test le by testing the qstest package itself:
4 test
5 \RequirePackage{qstest}
1.1 Pattern and keyword lists
Check section Match patterns and targets of the makematch package for an
explanation of the comma-separated pattern and keyword lists. In a nutshell, both
are lists of arbitrary material that is not expanded but rather used in sanitized
(printable) form. Patterns may contain wildcard characters * matching zero or
more characters, and may be preceded by ! in order to negate a match from an
earlier pattern in the pattern list. Leading spaces before an item in either list are
discarded.