I was trying to figure out how to test my xpeek package (see https://github.com/jcsalomon/xpeek) and I came across What's the folk-lore on automatic testing of TeX programming? and Testing Framework API for LaTeX. Both of these mention the qstest package, but I’m having trouble understanding how to use it.
To be concrete, consider this test of xspace (xpeek can be used to implement \xspace, so this is not far removed from what I want to do):
\documentclass{article}
\usepackage{xspace, qstest}
\begin{document}
\begin{qstest}{test xspace}{}
\Expect{foo\xspace.}{foo.}
\end{qstest}
\end{document}
This fails, yielding this error message:
! Package qstest Error: Failed: test xspace
\Expect: foo\xspace .
<foo.
>foo\xspace ..
See the qstest package documentation for explanation.
Obviously I’m missing something fundamental here, but reading the qstest package documentation is not making things any clearer to me. Can anyone explain to me how to write the test so it succeeds?
qstestthat I can find. – J. C. Salomon Aug 15 '12 at 16:32xpeekat this commit. – J. C. Salomon Aug 15 '12 at 19:59