summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_document.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index eab2be9..33f6df7 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -209,12 +209,14 @@ TEST_XML(document_save_declaration, "<node/>")
TEST_XML(document_save_file, "<node/>")
{
- CHECK(doc.save_file("tests/data/output.xml"));
+ const char* path = tmpnam(0);
- CHECK(doc.load_file("tests/data/output.xml", pugi::parse_default | pugi::parse_declaration));
+ CHECK(doc.save_file(path));
+
+ CHECK(doc.load_file(path, pugi::parse_default | pugi::parse_declaration));
CHECK_NODE(doc, STR("<?xml version=\"1.0\"?><node />"));
- unlink("tests/data/output.xml");
+ unlink(path);
}
TEST_XML(document_save_file_error, "<node/>")