summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-07-11 15:14:13 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-11 16:42:01 +0200
commit3ef6cf060e984bca43956a23b61b32ec7347cfc7 (patch)
tree14810e4d0168c0cc3d69cb286574bf28375c07bc /tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
parentb06304e164ba47351fa292662c1e6383c081b5ca (diff)
parent7b9d6cf844ece18fef884f51117e25ad4ac31db5 (diff)
Merge branch 'stable' into dev
Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
Diffstat (limited to 'tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp')
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index a96d8706ee..2756fcce50 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -94,20 +94,31 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
void tst_QFileSystemWatcher::basicTest_data()
{
QTest::addColumn<QString>("backend");
- QTest::newRow("native backend") << "native";
- QTest::newRow("poller backend") << "poller";
+ QTest::addColumn<QString>("testFileName");
+ const QString testFile = QStringLiteral("testfile.txt");
+ // QTBUG-31341: Test the UNICODE capabilities; ensure no QString::toLower()
+ // is in the code path since that will lower case for example
+ // LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE with context, whereas the Windows file
+ // system will not.
+ const QString specialCharacterFile =
+ QString(QChar(ushort(0x130))) // LATIN_CAPITAL_LETTER_I_WITH_DOT_ABOVE
+ + QChar(ushort(0x00DC)) // LATIN_CAPITAL_LETTER_U_WITH_DIAERESIS
+ + QStringLiteral(".txt");
+
+ QTest::newRow("native backend-testfile") << "native" << testFile;
+ QTest::newRow("poller backend-testfile") << "poller" << testFile;
+ QTest::newRow("native backend-specialchars") << "native" << specialCharacterFile;
}
void tst_QFileSystemWatcher::basicTest()
{
QFETCH(QString, backend);
+ QFETCH(QString, testFileName);
// create test file
QTemporaryDir temporaryDirectory(m_tempDirPattern);
QVERIFY(temporaryDirectory.isValid());
- QFile testFile(temporaryDirectory.path() + QStringLiteral("/testfile.txt"));
- testFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner);
- testFile.remove();
+ QFile testFile(temporaryDirectory.path() + QLatin1Char('/') + testFileName);
QVERIFY(testFile.open(QIODevice::WriteOnly | QIODevice::Truncate));
testFile.write(QByteArray("hello"));
testFile.close();