diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-12 07:30:13 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-06-12 07:30:13 +0000 |
commit | 0ed895d79c77979e2721822020dbf386da7a0747 (patch) | |
tree | bf8cdfc0913268d0f6eeef1e26ab8067720aa025 /tests | |
parent | f2050e5170e5c49b19ec591a36fcb748bbc0b351 (diff) |
Refactored PI/declaration parsing, now non top-level declarations result in parsing errors
git-svn-id: http://pugixml.googlecode.com/svn/trunk@515 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_dom_modify.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp index b45dab1..31647d4 100644 --- a/tests/test_dom_modify.cpp +++ b/tests/test_dom_modify.cpp @@ -513,10 +513,13 @@ TEST_XML(dom_node_copy_crossdoc, "<node/>") CHECK_NODE(newdoc, STR("<node />"));
}
-TEST_XML_FLAGS(dom_node_copy_types, "<root><?xml version='1.0'?><?pi value?><!--comment--><node id='1'>pcdata<![CDATA[cdata]]></node></root>", parse_default | parse_pi | parse_comments | parse_declaration)
+TEST_XML_FLAGS(dom_node_copy_types, "<?xml version='1.0'?><root><?pi value?><!--comment--><node id='1'>pcdata<![CDATA[cdata]]></node></root>", parse_default | parse_pi | parse_comments | parse_declaration)
{
doc.append_copy(doc.child(STR("root")));
- CHECK_NODE(doc, STR("<root><?xml version=\"1.0\"?><?pi value?><!--comment--><node id=\"1\">pcdata<![CDATA[cdata]]></node></root><root><?xml version=\"1.0\"?><?pi value?><!--comment--><node id=\"1\">pcdata<![CDATA[cdata]]></node></root>"));
+ CHECK_NODE(doc, STR("<?xml version=\"1.0\"?><root><?pi value?><!--comment--><node id=\"1\">pcdata<![CDATA[cdata]]></node></root><root><?pi value?><!--comment--><node id=\"1\">pcdata<![CDATA[cdata]]></node></root>"));
+
+ doc.insert_copy_before(doc.first_child(), doc.first_child());
+ CHECK_NODE(doc, STR("<?xml version=\"1.0\"?><?xml version=\"1.0\"?><root><?pi value?><!--comment--><node id=\"1\">pcdata<![CDATA[cdata]]></node></root><root><?pi value?><!--comment--><node id=\"1\">pcdata<![CDATA[cdata]]></node></root>"));
}
TEST_XML(dom_attr_assign_large_number, "<node attr1='' attr2='' />")
|