diff --git a/tests/test_document.cpp b/tests/test_document.cpp index 4205949ff98d26f381118087d6af60190310b50b..e6b9081e97f741bd3c98f407ed3cb71225ea8e70 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -1739,4 +1739,15 @@ TEST_XML(document_move_buffer, "<node1/><node2/>") CHECK(other.child(STR("node2")).offset_debug() == 9); } + +TEST_XML(document_move_append_child_zero_alloc, "<node1/><node2/>") +{ + test_runner::_memory_fail_threshold = 1; + + xml_document other = std::move(doc); + + CHECK(other.append_child(STR("node3"))); + + CHECK_NODE(other, STR("<node1/><node2/><node3/>")); +} #endif