fix test by ignoring exception due to invalid path name on Windows

This commit is contained in:
Günter Obiltschnig 2023-10-01 17:30:27 +02:00
parent a66a298bf6
commit 7f5c7d1ab2

View File

@ -258,9 +258,16 @@ void AbstractConfigurationTest::testExpand()
assertTrue (pConf->expand("default=${undefined:-default value}") == "default=default value");
assertTrue (pConf->expand("default=${undefined:-}") == "default=");
try
{
assertTrue (pConf->expand("default=${undefined:value}") == "default=${undefined:value}");
assertTrue (pConf->expand("default:${undefined::value}") == "default:${undefined::value}");
}
catch (Poco::PathSyntaxException&)
{
// Note: This will result in an invalid path (on Windows), throwing an exception which can be safely ignored.
}
}
void AbstractConfigurationTest::testSetString()