Skip to content

Conversation

nolanw
Copy link
Contributor

@nolanw nolanw commented Jul 13, 2013

I've gone through nearly all the tree construction tests and updated the parse errors.

My method was to take each test and compare the number of reported parse errors between html5lib-python and the parser I'm working on. Where they agreed, I simply pasted html5lib-python's errors in. Where they disagreed, I stepped through with the spec in hand and tried to tease out the proper errors. (Sometimes html5lib-python looked right. Sometimes my parser looked right. Sometimes neither looked right. And I'm sure I didn't get them all right, but I think it's a good deal better than nothing.) Note that although the number of errors for a given test may be agreed upon between the two parsers, I did not verify that those errors are accurately described.

I have not yet done tests09 and tests10. I'll add them later, in this or another pull request. I have not done, and do not plan to do, template.

I did delete one test: the fifth test in tests18. It was an exact duplicate of the fourth test in tests18.

Whenever I resolved disagreements between the parsers against html5lib-python, I took notes. They're available in this gist in hopes that they may be helpful. I numbered the tests in each file starting with zero, as they were before any commits in this pull request.

Fixes #14 (and then some).

@hoppipolla-critic-bot
Copy link

Critic review: https://critic.hoppipolla.co.uk/r/219

This is an external review system which you may optionally use for the code review of your pull request.

@gsnedders
Copy link
Member

Any reason to not do template? (Note <template> parsing has now been merged into the HTML spec.)

Do you want to merge this now or wait until you've done the rest? I'm going to basically take this on trust, given I'm not reviewing this until I get around to fixing html5lib-python and then only in terms of what we disagree on.

@nolanw
Copy link
Contributor Author

nolanw commented Jul 14, 2013

The test files I skipped (template, tests09, tests10) were because my parser and html5lib-python disagreed on the resulting tree in some of the tests. For template, I simply haven't implemented it yet. For tests09 and tests10, it's a small part of the spec I don't yet understand.

Let's wait to merge until I finish tests09 and tests10. I'll know by then if I'm going to do template anytime soon.

@nolanw
Copy link
Contributor Author

nolanw commented Jul 22, 2013

I'ma pass on the template tests for now, so feel free to merge it up!

gsnedders added a commit that referenced this pull request Jul 22, 2013
Update parse errors for tree construction tests to match spec.
@gsnedders gsnedders merged commit acaf74d into html5lib:master Jul 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOCTYPE parse errors missing from various tree construction tests
3 participants