summaryrefslogtreecommitdiff
path: root/tests/test_dom_modify.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_dom_modify.cpp')
-rw-r--r--tests/test_dom_modify.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp
index 8b869f4..780608f 100644
--- a/tests/test_dom_modify.cpp
+++ b/tests/test_dom_modify.cpp
@@ -403,6 +403,17 @@ TEST_XML(dom_node_remove_child, "<node><n1/><n2/><n3/><child><n4/></child></node
CHECK_NODE(doc, STR("<node><n2 /><child /></node>"));
}
+TEST_XML(dom_node_remove_child_complex, "<node id='1'><n1 id1='1' id2='2'/><n2/><n3/><child><n4/></child></node>")
+{
+ doc.child(STR("node")).remove_child(STR("n1"));
+
+ CHECK_NODE(doc, STR("<node id=\"1\"><n2 /><n3 /><child><n4 /></child></node>"));
+
+ doc.remove_child(STR("node"));
+
+ CHECK_NODE(doc, STR(""));
+}
+
TEST_XML(dom_node_append_copy, "<node>foo<child/></node>")
{
CHECK(xml_node().append_copy(xml_node()) == xml_node());