summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-04-08 21:24:25 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-04-08 21:24:26 +0200
commit4973786f0d36fc379c7e88a20c51639e93ddea2a (patch)
treed4d0e3cc8adc4be3aeef13bffb6907154daf95fd /tests/auto/corelib/io
parent0b17d2328592c03503c41af7d594e58233255ff5 (diff)
parent00540a8345c35703aeaab072fd9e4727c9b61d5a (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
index 2c86f0f19c..5796636b92 100644
--- a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
+++ b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
@@ -119,6 +119,14 @@ void tst_QSaveFile::transactionalWrite()
QFile reader(targetFile);
QVERIFY(reader.open(QIODevice::ReadOnly));
QCOMPARE(QString::fromLatin1(reader.readAll()), QString::fromLatin1("Hello"));
+
+ // check that permissions are the same as for QFile
+ const QString otherFile = dir.path() + QString::fromLatin1("/otherfile");
+ QFile::remove(otherFile);
+ QFile other(otherFile);
+ other.open(QIODevice::WriteOnly);
+ other.close();
+ QCOMPARE(QFile::permissions(targetFile), QFile::permissions(otherFile));
}
void tst_QSaveFile::saveTwice()