A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mail-archive.com/html5lib-discuss@googlegroups.com/msg00026.html below:

Re: [html5lib commit] r651 - trunk/tests

2007/5/31, Sam Ruby:
>
> Just to make sure that we are talking about the same thing, here's an
> example failure:
>
> > FAIL: thead end-tag followed by tbody start-tag [[u'EndTag', u'thead'],
> [u'StartTag', u'tbody', {}]]    {}
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/home/rubys/svn/html5lib/tests/test_serializer.py", line 61, in 
> > <lambda>
> >     func = lambda self: self.mockTest(expected, input, options)
> >   File "/home/rubys/svn/html5lib/tests/test_serializer.py", line 73, in 
> > mockTest
> >     self.fail("Expected: %s, Received: %s" % (expected, result))
> > AssertionError: Expected: [u'<tbody>'], Received: </thead><tbody>
>
> How should that test be corrected?  If "omit_optional_tags" is set to
> True, should the "</thead>" still be serialized?
It might. It's a "may omit", not a "must omit" (in the spec).

The current "optional tags filter" doesn't omit each and every
optional tag (see comments within the code) because it only looks at
two tokens while some rules needs to look at three (i.e. <body> and
<colgroup> start tags).

Should these tests fail because I chose not omit some tags? the
current implementation still conforms to the spec, so I think the
tests should pass.
But I also think that the "</thead><tbody>" expected result should be
marked as "not optimized for compactness" so that implementors,
besides testing for spec conformance, can also test whether they
perform "aggressive optimization" (omitting each and every tag that is
optional) or not.

-- 
Thomas Broyer

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"html5lib-discuss" group.
 To post to this group, send email to html5lib-discuss@googlegroups.com
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB
-~----------~----~----~----~------~----~------~--~---


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4