Re: [eventsource] Moving Server-sent Events spec back to Last Call

On Mon, 7 Mar 2011, Anne van Kesteren wrote:
> > 
> > The test suite seems very short for the spec... in particular, it 
> > doesn't seem to test the parsing of the event format very well.
> 
> Anything in particular you think needs testing?

Zero, one or two BOMs before an event.

Parsing of comments with zero, one, or 2049 bytes of content, on either 
side of a real field.

Handling of unknown fields. Handling of fields with names similar to but 
not identical to valid fields, in particular with spaces, hyphens, 
underscares, nulls where they're not expected; with uppercase names 
instead of lowercase ones; with turkish upper-case dotted Is where a 
lowercase i is expected.

Fields with and without value parts, for each allowed field and for 
illegal fields. Fields with and without spaces after their colons.

End of line handling: cr/lf/cr, lf/cr/lf, etc.

Event dispatch when the last field ends with eof.

Nulls in values. Surrogate halves in field names and values. UTF-8 errors 
in field names and values.

"Retry" field with leading zeros that are binary and octal (011, 071), 
with hex values (0x01), with non-numeric trailing garbage (123x).


> > Also, the tests seem to rely on a big external file, which is 
> > generally bad practice, but I'm not familiar enough with the test 
> > harness to be able to tell whether this is a real problem or not. 
> > Personally I prefer test harnesses that keep well out of the way, e.g. 
> > by using parent.test() to report results -- for example, see:
> > 
> >   http://www.hixie.ch/tests/adhoc/html/parsing/encoding/001.html
> > 
> > ...which works fine as a stand-alone test (and has no external 
> > dependencies) but can also work in a harness:
> > 
> >   http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html
> > 
> > I probably shouldn't be whining about tests though given that I didn't 
> > write any for this spec. :-)
> 
> I do not really care about the format that much. For automated testing a 
> harness is useful and vendors seem to be somewhat willing to converge on 
> something that can be used for most of our tests.

I've no problem with a harness, my problem is just that the tests require 
the harness to run. I prefer tests that are standalone but when used in a 
harness can report errors to their harness. But that's just a personal 
preference.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 7 March 2011 19:07:01 UTC