[imps] Tree-construction tests format
Henri Sivonen
hsivonen at iki.fi
Fri Oct 12 06:00:59 PDT 2007
On Oct 12, 2007, at 11:39, Anne van Kesteren wrote:
> On Fri, 12 Oct 2007 09:43:26 +0200, Thomas Broyer <t.broyer at gmail.com>
> wrote:
>> The format of the tests in tests6.dat doesn't follow the rules found
>> on the wiki
>> <http://wiki.whatwg.org/wiki/Parser_tests#Tree_Construction_Tests>,
>> namely the #errors section is the last one, before the
>> #document-fragment and/or #document sections.
>>
>> Should we fix the tests6.dat file or the wiki (and thus should I fix
>> my test parser) ?
>
> I guess the way the html5lib parser is written it simply depends on
> the
> first thingie starting with "#data" and after that either #document or
> #errors is ok... I think it makes sense to fix the testcases though
> unless everyone thinks the html5lib way of parsing is sane enough...
It appears that I've already implemented back-and-forth reading of
the test format because the fragment came after #data and you need to
know the fragment before you parse the data. This is all very
brittle, so I don't like changes to the actual test format in
general. However, I would sympathize with reordering that'd put all
the parser configuration prerequisites (#document-fragment) before
#data.
--
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
More information about the Implementors
mailing list