Skip to content
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

Add unit tests for xml-writer #3625

Merged
merged 1 commit into from May 27, 2020
Merged

Conversation

gilligan
Copy link
Contributor

@gilligan gilligan commented May 25, 2020

Summary:
Add unit tests for xml-writer.cc

Notes:
Small surface and just some basic tests to establish/document functionality. I did notice one thing though:

When providing attributes <key,value> only the value is escaped, the key isn't. Meaning it's possible to write invalid xml. I'll let the unit test encode the current state and open an issue when this is merged. Fixing this in XMLWriter::writeAttrs(const XMLAttrs & attrs) should be easy enough and I can do that as a follow-up. From what I can tell attribute names cannot be escaped so this would have to throw instead.

@gilligan gilligan mentioned this pull request May 25, 2020
16 tasks
@edolstra edolstra merged commit dae6a26 into NixOS:master May 27, 2020
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.

None yet

2 participants