Skip to content

Fix and test serialization #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 of 4 tasks
SimonSapin opened this issue Oct 31, 2013 · 1 comment
Closed
3 of 4 tasks

Fix and test serialization #24

SimonSapin opened this issue Oct 31, 2013 · 1 comment

Comments

@SimonSapin
Copy link
Member

The serialization code (that I’m about to submit in a pull request) is incorrect and fails its tests, which are for now disabled. But it is good enough for the purpose of error reporting in Servo.

I believe that the spec is incorrect: http://dev.w3.org/csswg/css-syntax/#serialization

  • Fix the spec
  • Update the implementation accordingly
  • Make sure the tests pass
  • Add more tests that trigger serialization corner cases
SimonSapin added a commit to SimonSapin/rust-cssparser that referenced this issue Oct 31, 2013
Serialization is considered correct if it maintains the invariant:

  parse(serialize(parse(text))) == parse(text)

for any text (Unicode string.)
This is not the case of this code yet (see servo#24),
but it’s good enough for error reporting in Servo.
@SimonSapin
Copy link
Member Author

The existing tests pass. I don’t really want to bother adding more, it’s such uninteresting corner cases…

kmcallister added a commit that referenced this issue Nov 6, 2013
Fix #24: serialization corner cases.
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

No branches or pull requests

1 participant