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, "") TEST_XML(document_save_file, "") { - 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("")); - unlink("tests/data/output.xml"); + unlink(path); } TEST_XML(document_save_file_error, "")