summaryrefslogtreecommitdiff
path: root/tests/test_dom_modify.cpp
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-20 23:47:00 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-20 23:47:16 -0800
commitdb8df4a5665cfb24c1c18be438d10b2e310a234e (patch)
tree16d251ba91d88fd99343e9628348f912e0170f1a /tests/test_dom_modify.cpp
parentcca23e636354dc73429a19e14e32cc9a5e632735 (diff)
parent125aa55061ccde4ae7351a9a6c7270a15c9e0204 (diff)
Merge branch 'master' into compact
Diffstat (limited to 'tests/test_dom_modify.cpp')
-rw-r--r--tests/test_dom_modify.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp
index 6417033..9c9109b 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -1289,7 +1289,7 @@ TEST(dom_node_copy_stackless)
data += STR("</a>");
xml_document doc;
- CHECK(doc.load(data.c_str()));
+ CHECK(doc.load_string(data.c_str()));
xml_document copy;
CHECK(copy.append_copy(doc.first_child()));
@@ -1329,7 +1329,7 @@ TEST(dom_node_copy_copyless)
TEST(dom_node_copy_copyless_mix)
{
xml_document doc;
- CHECK(doc.load(STR("<node>pcdata<?name value?><child attr1=\"\" attr2=\"value2\" /></node>"), parse_full));
+ CHECK(doc.load_string(STR("<node>pcdata<?name value?><child attr1=\"\" attr2=\"value2\" /></node>"), parse_full));
xml_node child = doc.child(STR("node")).child(STR("child"));
@@ -1431,3 +1431,15 @@ TEST_XML(dom_node_set_deallocate, "<node attr='value'>text</node>")
CHECK_NODE(doc, STR("<:anonymous :anonymous=\"\"></:anonymous>"));
}
+
+TEST(dom_node_copy_declaration_empty_name)
+{
+ xml_document doc1;
+ xml_node decl1 = doc1.append_child(node_declaration);
+ decl1.set_name(STR(""));
+
+ xml_document doc2;
+ xml_node decl2 = doc2.append_copy(decl1);
+
+ CHECK_STRING(decl2.name(), STR(""));
+}