summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_document.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 8796560..971bb48 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -925,3 +925,13 @@ TEST_XML(document_reset_copy, "<node><child/></node>")
CHECK(doc.first_child().offset_debug() == -1);
}
+
+TEST_XML(document_reset_copy_self, "<node><child/></node>")
+{
+ CHECK_NODE(doc, STR("<node><child /></node>"));
+
+ doc.reset(doc);
+
+ CHECK(!doc.first_child());
+ CHECK_NODE(doc, STR(""));
+}