From bef9439b01ed9a6ffcc850e355ff65eb531fe354 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Wed, 2 Jun 2010 06:37:29 +0000 Subject: tests: Fixed test race condition (a better way would be to use argv[0]-relative path, but let's leave it like that till it breaks) git-svn-id: http://pugixml.googlecode.com/svn/trunk@494 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_document.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/test_document.cpp') 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, "") -- cgit v1.2.3