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
This commit is contained in:
parent
c622ce6fed
commit
bef9439b01
@ -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/>")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user