diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2016-04-14 00:30:24 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2016-04-14 00:30:24 -0700 |
commit | 2e0ed8284b7488f9664bf8dba9aae90688862cc3 (patch) | |
tree | df01542bd9a856144ba1bd8f3e2bc1d444c7478a /tests/test_parse_doctype.cpp | |
parent | c6539ccef04ded1427831aa58404635af22e7634 (diff) |
Remove extra space in an empty tag for format_raw
When using format_raw the space in the empty tag (<node />) is the only
character that does not have to be there; so format_raw almost results in
a minimal XML but not quite.
It's pretty unlikely that this is crucial for any users - the formatting
change should be benign, and it's better to improve format_raw than to add
yet another flag.
Fixes #87.
Diffstat (limited to 'tests/test_parse_doctype.cpp')
-rw-r--r-- | tests/test_parse_doctype.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_parse_doctype.cpp b/tests/test_parse_doctype.cpp index 901890c..e32af8e 100644 --- a/tests/test_parse_doctype.cpp +++ b/tests/test_parse_doctype.cpp @@ -36,9 +36,9 @@ static bool test_doctype_wf(const char_t* decl) if (!load_concat(doc, STR("a"), decl, STR("b")) || !test_node(doc, STR("ab"), STR(""), format_raw)) return false; // node pre/postfix - if (!load_concat(doc, STR("<nodea/>"), decl) || !test_node(doc, STR("<nodea />"), STR(""), format_raw)) return false; - if (!load_concat(doc, decl, STR("<nodeb/>")) || !test_node(doc, STR("<nodeb />"), STR(""), format_raw)) return false; - if (!load_concat(doc, STR("<nodea/>"), decl, STR("<nodeb/>")) || !test_node(doc, STR("<nodea /><nodeb />"), STR(""), format_raw)) return false; + if (!load_concat(doc, STR("<nodea/>"), decl) || !test_node(doc, STR("<nodea/>"), STR(""), format_raw)) return false; + if (!load_concat(doc, decl, STR("<nodeb/>")) || !test_node(doc, STR("<nodeb/>"), STR(""), format_raw)) return false; + if (!load_concat(doc, STR("<nodea/>"), decl, STR("<nodeb/>")) || !test_node(doc, STR("<nodea/><nodeb/>"), STR(""), format_raw)) return false; // check load-store contents preservation CHECK(doc.load_string(decl, parse_doctype | parse_fragment)); |