diff --git a/tests/test_dom_modify.cpp b/tests/test_dom_modify.cpp index 0fb1911..6e17dd4 100644 --- a/tests/test_dom_modify.cpp +++ b/tests/test_dom_modify.cpp @@ -1242,3 +1242,25 @@ TEST_XML(dom_node_move_tree, "t1t2< CHECK(n3 == doc.child(STR("n3"))); CHECK(n4 == root.child(STR("n4"))); } + +TEST(dom_node_copy_stackless) +{ + unsigned int count = 20000; + std::basic_string data; + + for (unsigned int i = 0; i < count; ++i) + data += STR(""); + + data += STR("text"); + + for (unsigned int i = 0; i < count; ++i) + data += STR(""); + + xml_document doc; + CHECK(doc.load(data.c_str())); + + xml_document copy; + CHECK(copy.append_copy(doc.first_child())); + + CHECK_NODE(doc, data.c_str()); +}