diff options
author | Peter Yard <peter.yard@nokia.com> | 2009-07-24 04:20:16 (GMT) |
---|---|---|
committer | Peter Yard <peter.yard@nokia.com> | 2009-07-24 04:20:16 (GMT) |
commit | ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1 (patch) | |
tree | a0fbfb009316f8fb9b2600db7a86fadbeef966e4 /tests/auto/qdir/tst_qdir.cpp | |
parent | 3d272951dc9f055e9fc5064098f6a165a8c3e623 (diff) | |
parent | 9ec431c161202d9f06f3a7c59181cb0ab523958a (diff) | |
download | Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.zip Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.tar.gz Qt-ed159f974aa99e2ba3cc3112f7e3a1ced26b14b1.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests/auto/qdir/tst_qdir.cpp')
-rw-r--r-- | tests/auto/qdir/tst_qdir.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/auto/qdir/tst_qdir.cpp b/tests/auto/qdir/tst_qdir.cpp index 1fd5e88..e5b23ab 100644 --- a/tests/auto/qdir/tst_qdir.cpp +++ b/tests/auto/qdir/tst_qdir.cpp @@ -571,10 +571,21 @@ void tst_QDir::entryList() return; } - for (int i=0; i<max; ++i) - QCOMPARE(actual[i], expected[i]); + bool doContentCheck = true; +#ifdef Q_OS_UNIX + if (qstrcmp(QTest::currentDataTag(), "QDir::AllEntries | QDir::Writable") == 0) { + // for root, everything is writeable + if (::getuid() == 0) + doContentCheck = false; + } +#endif - QCOMPARE(actual.count(), expected.count()); + if (doContentCheck) { + for (int i=0; i<max; ++i) + QCOMPARE(actual[i], expected[i]); + + QCOMPARE(actual.count(), expected.count()); + } QFile::remove(SRCDIR "entrylist/writable"); QFile::remove(SRCDIR "entrylist/linktofile"); |