RE: html5lib tests

On Tue, 12 Jul 2011, Kris Krueger wrote:

> Given that we have consensus let's move forward as using this 'dat' format as the w3c test standard for parser tests.
> If you object please respond....
>
> If we can all agree then I'd like to see that we have a set of 'dat' files that we can share and use for various parser tests.
> Though the current html5lib tests that have been submitted are a good addition to the HTML5 test suite.
> It would be better to have the 'dat' files be separated for reuse.

The current approach is to use a script to generate the javascript tests 
from the .dat files. If we add more tests to the dat files it is trivial 
to update the generated tests simply by rerunning the script. So they 
already are "seperated for reuse". This approach was chosen because it is 
relatively simple on the browser side; with all the test data URL encoded 
and embedded in the file, there is no need to load and parse external 
files or fight encoding related issues. This makes the tests much less 
complex; it is less likely that they will go wrong because of unrelated 
browser bugs. As written, the tests can already be used to test both pure 
parsing (via data: URIs) and also parsing from document.write and, where 
appropriate, innerHTML (note that there are some outstanding problems with 
different requirements for document.write vs normal parsing and that tests 
in general cannot be reused between innerHTML and non-innerHTML).

Received on Wednesday, 13 July 2011 10:16:50 UTC