Several months ago I wrote a LaTeX package for logical formatting of quotations, i.e. putting quote marks in appropriate style when the user decides only about the semantics of the document. The package is free software available in my Mercurial repository (it is licensed under the GNU General Public License version 3 or later, with an exception for documents using it).
Then I maintained several large documents using the package (and some others), so I could modify it and detect most errors in the next compilation of these documents. Now I develop some packages which will be rarely used and will have much larger changes, so some automatic tests are necessary.
Now I used a trivial method to check the correctness of this package. I wrote a one-page example (i.e. useless) document using the package in all documented ways, although only one set of package options was used. The I compiled it using a Bourne shell script which just calls LaTeX for all such examples and corrected all visible errors in the output (I noticed also that support for multi-paragraph multi-level quotations is very unintuitive to use).
Now the correct output lays in the Mercurial repository. I though that Mercurial could detect changes in these files, but it detects changes in the timestamps recorded there. So I added to the shell script (runtests.sh in the main directory of the package) TeX code to set the time to a constant value (January 1, 1970, 00:00). Now it words.
Now the package needs only tests for use with other options before large changes will be easier in it. The test output still needs changes when e.g. a new version of TeX is used or file names listed in the log change, but this will not require much work.
