summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtemporaryfile
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-08-16 17:53:41 +0200
committerJoão Abecasis <joao.abecasis@nokia.com>2011-08-17 17:52:23 +0200
commit401722ef9e6fe79bd41f9d5f79668f5c4997c8e6 (patch)
treeb5c62add772e013405bacc6bcff727091bced87f /tests/auto/qtemporaryfile
parent0de701d01cb221464eed773fd3751aff73fe4d60 (diff)
Fix QTemporaryFile regressions and new found issues
With this change, the file template is always processed in original QString format. Trying to generate native paths before adding a missing placeholder mask could change the meaning of templates, such as "." and "..", which are now tested to mean "..XXXXXX" and "...XXXXXX", respectively. After ensuring the template includes a placeholder mask, the path is converted to a native *absolute* file path and the mask is sought for again. On Windows, native paths were already absolute. On Symbian, we'd need at least a clean path, as "." and ",," are not natively understood. There is a requirement that the placeholder mask /XXXXXX+/ makes it through this conversion unaltered, which relaxes prior requirements on *nix platforms. On Windows and Symbian the conversion is under Qt's control and not user-configurable. Reviewed-by: Shane Kearns
Diffstat (limited to 'tests/auto/qtemporaryfile')
-rw-r--r--tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
index 2db5c60daf..18b9337396 100644
--- a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -632,6 +632,8 @@ void tst_QTemporaryFile::QTBUG_4796_data()
QString unicode = QString::fromUtf8("\xc3\xa5\xc3\xa6\xc3\xb8");
QTest::newRow("<empty>") << QString() << QString() << true;
+ QTest::newRow(".") << QString(".") << QString() << true;
+ QTest::newRow("..") << QString("..") << QString() << true;
QTest::newRow("blaXXXXXX") << QString("bla") << QString() << true;
QTest::newRow("XXXXXXbla") << QString() << QString("bla") << true;
QTest::newRow("does-not-exist/qt_temp.XXXXXX") << QString("does-not-exist/qt_temp") << QString() << false;