A Proposal for Rewriting the Stylesheets Tests
The current state of the tests
The Stylesheets Test folder contains the current testing mechanism, and I've been investigating it over the last few weeks. The set of tests clearly grew by accretion with not much in the way of an overall plan, and predictably it has become an over-complicated collection of inconsistencies, obsolescence and mystery. It basically works like this:
1. The tests are run using a Makefile (Test/Makefile). 2. The Makefile is divided into a range of targets intended to test different features, such as test-to-html, test-markdown, test-cocoa and so on. 3. Each target contains multiple tests which apply one of the conversions supported by the Stylesheets and then check the result in some way.
The conversions are applied in various different ways:
- By running the symlinked command (e.g. bin/teitohtml) which calls the bin/transformtei script
- By running ant and passing one of the ant build files such as /docx/build-to.xml
- By running Saxon and applying one of the XSLT stylesheets directly (such as fo/to.xsl)
There appears to be no rationale governing which method is used to invoke a process.