Issue 302: clear any previous save error

This commit is contained in:
Ant Mitchell
2015-03-24 16:20:36 +00:00
parent 32cca51ac5
commit 189198f19c
2 changed files with 12 additions and 0 deletions

View File

@@ -1425,6 +1425,15 @@ int main( int argc, const char ** argv )
XMLPrinter printer;
doc.Print( &printer );
}
{
// Issue 302. Clear errors from LoadFile/SaveFile
XMLDocument doc;
doc.SaveFile( "./no/such/path/pretty.xml" );
XMLTest( "Issue 302. Fail to save", doc.ErrorName(), "XML_ERROR_FILE_COULD_NOT_BE_OPENED" );
doc.SaveFile( "./resources/out/compact.xml", true );
XMLTest( "Issue 302. Subsequent success in saving", doc.ErrorName(), "XML_SUCCESS" );
}
// ----------- Performance tracking --------------
{