FORMATTER TESTS The formatter tests currently consist of: latexformatter.php: Tests the LaTeX output format. raw.php Luminous scanners are meant to generate data which looks a lot like XML. This converts it into proper XML (just involves adding root tag, a header and encoding) and loads it into an error intolerant XML parser to determine whether it is well formed or not. Returns 0 if successful, 1 on failure. A Log is written to $LUMINOUS/tests/log/formatter_raw TODO now that Luminous is using individual scanners, there should be at least 1 test per language (use the regression database) html.php [DOCTYPES...] Tests the HTML formatter. This generates some HTML from a pre-parsed and tagged file and validates it online using the W3C validation service. The output from this will NOT change as a result of a change to Luminous's parsing algorithm. This tests only the HTML formatter. raw.php will test the parsing algorithm, as will the regression test suite. This requires http://pear.php.net/package/Services_W3C_HTMLValidator (apt-get install php-pear && pear install Services_W3C_HTMLValidator), as it provides a simple interface to accessing the validator. This test is SLOW! A 1-second pause is left between validation requests, and the data which has to be uploaded may be fairly large. Valid return codes are: 0 : Validation passed 1 : Failed validation - INVALID. 2 : Some error occurred. This isn't a validation failure; this means that something went wrong before we managed to figure out whether it was valid. This is due to uncaught errors somewhere in Services_W3C_HTMLValidator or its dependencies. This is absolutely meaingless and the test will need to be repeated. 3 : Services_W3C_HTMLValidator is not installed. Valid doctypes are: html4strict html4loose xhtml1.0strict xhtml1.0loose xhtml1.1 html5 A Log is written to $LUMINOUS/tests/log/formatter_html