aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2013-10-31 09:23:47 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-01 21:18:56 +0100
commit50a3ddcbbf07b5a1a17ecc1b2c5ddcd61905eca2 (patch)
tree2b436c181d306979b1ac3c3fe91e59c67a31eee8 /tests
parent599b70c51b17e89dbcc5f1252ef18535fa99f5dd (diff)
tests: fix tst_qqmlmoduleplugin::incorrectPluginCase()
It gives different error message based on the case sensitivity of the file system on Mac. Task-number: QTBUG-32652 Change-Id: I52415126e63978c9f80b7652e0116e0e07703fd8 Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
index 25c08f82a2..a6d9fb5601 100644
--- a/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
+++ b/tests/auto/qml/qqmlmoduleplugin/tst_qqmlmoduleplugin.cpp
@@ -197,21 +197,21 @@ void tst_qqmlmoduleplugin::incorrectPluginCase()
QList<QQmlError> errors = component.errors();
QCOMPARE(errors.count(), 1);
+ QString expectedError = QLatin1String("module \"org.qtproject.WrongCase\" plugin \"PluGin\" not found");
+
#if defined(Q_OS_MAC) || defined(Q_OS_WIN32)
+ bool caseSensitive = true;
#if defined(Q_OS_MAC)
+ caseSensitive = pathconf(QDir::currentPath().toLatin1().constData(), _PC_CASE_SENSITIVE);
QString libname = "libPluGin.dylib";
#elif defined(Q_OS_WIN32)
+ caseSensitive = false;
QString libname = "PluGin.dll";
#endif
- QString expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname) + QLatin1String("\"");
-#else
- QString expectedError = QLatin1String("module \"org.qtproject.WrongCase\" plugin \"PluGin\" not found");
+ if (!caseSensitive)
+ expectedError = QLatin1String("plugin cannot be loaded for module \"org.qtproject.WrongCase\": File name case mismatch for \"") + QDir(m_importsDirectory).filePath("org/qtproject/WrongCase/" + libname) + QLatin1String("\"");
#endif
-#ifdef Q_OS_OSX
- if (QSysInfo::MacintoshVersion == QSysInfo::MV_10_8)
- QEXPECT_FAIL("", "See QTBUG-32652", Continue);
-#endif
QCOMPARE(errors.at(0).description(), expectedError);
}