summaryrefslogtreecommitdiffstats
path: root/tests/auto/installer
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/installer')
-rw-r--r--tests/auto/installer/settings/tst_settings.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/auto/installer/settings/tst_settings.cpp b/tests/auto/installer/settings/tst_settings.cpp
index 6deea6093..bf45f4856 100644
--- a/tests/auto/installer/settings/tst_settings.cpp
+++ b/tests/auto/installer/settings/tst_settings.cpp
@@ -108,15 +108,21 @@ void tst_Settings::loadEmptyConfig()
void tst_Settings::loadNotExistingConfig()
{
- QTest::ignoreMessage(QtDebugMsg, "create Error-Exception: \"Could not open settings file "
- ":/data/inexisting_config.xml for reading: "
- "Unknown error\" ");
+ QString configFile = QLatin1String(":/data/inexisting_config.xml");
+ QFile file(configFile);
+ QString errorString;
+
+ if (!file.open(QIODevice::ReadOnly)) {
+ errorString = file.errorString();
+ }
+ QTest::ignoreMessage(QtDebugMsg, QString::fromLatin1("create Error-Exception: \"Could not open"
+ " settings file %1 for reading: %2\"")
+ .arg(configFile).arg(errorString).toLatin1());
try {
- Settings::fromFileAndPrefix(":/data/inexisting_config.xml", ":/data");
+ Settings::fromFileAndPrefix(configFile, ":/data");
} catch (const Error &error) {
- QCOMPARE(error.message(), QLatin1String("Could not open settings file "
- ":/data/inexisting_config.xml for reading: "
- "Unknown error"));
+ QCOMPARE(error.message(), QString::fromLatin1("Could not open settings file "
+ "%1 for reading: %2").arg(configFile).arg(errorString));
return;
}
QFAIL("No exception thrown");