summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlibrary
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2010-04-29 14:56:12 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2010-05-03 13:47:43 (GMT)
commit9c419f945f1644e1bb66f4b5216a3d3adddb75b9 (patch)
tree32341e6521621b820b3cc02380bfbc288a82f752 /tests/auto/qlibrary
parent9c56dc1a2540a3bd6215d1165827f619c84a0b34 (diff)
downloadQt-9c419f945f1644e1bb66f4b5216a3d3adddb75b9.zip
Qt-9c419f945f1644e1bb66f4b5216a3d3adddb75b9.tar.gz
Qt-9c419f945f1644e1bb66f4b5216a3d3adddb75b9.tar.bz2
Fix to allow upper- and lowercase .dll suffix on windows
This fix is needed since windows uses case insensitive filesystems. Reviewed-by: Joao Task-number: QTBUG-10305
Diffstat (limited to 'tests/auto/qlibrary')
-rw-r--r--tests/auto/qlibrary/tst_qlibrary.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qlibrary/tst_qlibrary.cpp b/tests/auto/qlibrary/tst_qlibrary.cpp
index d4884db..3d26e0b 100644
--- a/tests/auto/qlibrary/tst_qlibrary.cpp
+++ b/tests/auto/qlibrary/tst_qlibrary.cpp
@@ -53,6 +53,7 @@
#define a_VALID false
#define so_VALID false
#define dll_VALID false
+#define DLL_VALID false
#if defined(Q_OS_DARWIN)
# undef bundle_VALID
@@ -88,6 +89,8 @@
#elif defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
# undef dll_VALID
# define dll_VALID true
+# undef DLL_VALID
+# define DLL_VALID true
# define SUFFIX ".dll"
# define PREFIX ""
@@ -352,6 +355,7 @@ void tst_QLibrary::isLibrary_data()
QTest::newRow(".a") << QString("mylib.a") << a_VALID;
QTest::newRow(".bundle") << QString("mylib.bundle") << bundle_VALID;
QTest::newRow(".dll") << QString("mylib.dll") << dll_VALID;
+ QTest::newRow(".DLL") << QString("MYLIB.DLL") << DLL_VALID;
QTest::newRow(".dl2" ) << QString("mylib.dl2") << false;
QTest::newRow(".dylib") << QString("mylib.dylib") << dylib_VALID;
QTest::newRow(".sl") << QString("mylib.sl") << sl_VALID;
@@ -556,7 +560,11 @@ void tst_QLibrary::fileName()
}
QVERIFY(ok);
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+ QCOMPARE(lib.fileName().toLower(), expectedFilename.toLower());
+#else
QCOMPARE(lib.fileName(), expectedFilename);
+#endif
}