Add a simple way to test loading arbitrary XML files
This test is disabled by default but can be run explicitly to check if loading the given XML file works. See #23026.
This commit is contained in:
parent
4b2e6a5a4c
commit
b732010138
1 changed files with 17 additions and 0 deletions
|
|
@ -608,3 +608,20 @@ void XmlTestCase::Doctype()
|
|||
dt = wxXmlDoctype( "root", "O'Reilly (\"editor\")", "Public-ID" );
|
||||
CPPUNIT_ASSERT( !dt.IsValid() );
|
||||
}
|
||||
|
||||
// This test is disabled by default as it requires the environment variable
|
||||
// below to be defined to point to a XML file to load.
|
||||
TEST_CASE("XML::Load", "[xml][.]")
|
||||
{
|
||||
wxString file;
|
||||
REQUIRE( wxGetEnv("WX_TEST_XML_FILE", &file) );
|
||||
|
||||
wxXmlDocument doc;
|
||||
REQUIRE( doc.Load(file) );
|
||||
CHECK( doc.IsOk() );
|
||||
|
||||
wxStringOutputStream sos;
|
||||
REQUIRE( doc.Save(sos) );
|
||||
|
||||
WARN("Dump of " << file << ":\n" << sos.GetString());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue