diff options
author | Ritt Konstantin <ritt.ks@gmail.com> | 2009-07-20 17:47:32 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-07-20 17:48:10 (GMT) |
commit | 6ca14dce65634e202b36499c76c268c87f78ceb6 (patch) | |
tree | 9eefeb9ebd0cd203e95b671f94eeaa4315fb3f69 /tests/auto | |
parent | ee4a76e2a1afade93ec89e9a7875837b195706e9 (diff) | |
download | Qt-6ca14dce65634e202b36499c76c268c87f78ceb6.zip Qt-6ca14dce65634e202b36499c76c268c87f78ceb6.tar.gz Qt-6ca14dce65634e202b36499c76c268c87f78ceb6.tar.bz2 |
Workaround for transacted, locked and inaccesible files
wich can not be stat'ed in a natural way.
FindFirstFile solves this problem.
Task-number: 167099
Task-number: 189202
Merge-request: 880
Reviewed-by: Joerg Bornemann <joerg.bornemann@trolltech.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qfileinfo/tst_qfileinfo.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 48dc357..e5831fd 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -127,6 +127,8 @@ private slots: void size_data(); void size(); + void systemFiles(); + void compare_data(); void compare(); @@ -354,8 +356,9 @@ void tst_QFileInfo::exists_data() QTest::newRow("data6") << "resources/*" << false; QTest::newRow("data7") << "resources/*.foo" << false; QTest::newRow("data8") << "resources/*.ext1" << false; - QTest::newRow("data9") << "." << true; - QTest::newRow("data10") << ". " << false; + QTest::newRow("data9") << "resources/file?.ext1" << false; + QTest::newRow("data10") << "." << true; + QTest::newRow("data11") << ". " << false; QTest::newRow("simple dir") << "resources" << true; QTest::newRow("simple dir with slash") << "resources/" << true; @@ -741,6 +744,17 @@ void tst_QFileInfo::size() QTEST(int(fi.size()), "size"); } +void tst_QFileInfo::systemFiles() +{ +#ifndef Q_OS_WIN + QSKIP("This is a Windows only test", SkipAll); +#endif + QFileInfo fi("c:\\pagefile.sys"); + QVERIFY(fi.exists()); // task 167099 + QVERIFY(fi.size() > 0); // task 189202 + QVERIFY(fi.lastModified().isValid()); +} + void tst_QFileInfo::compare_data() { QTest::addColumn<QString>("file1"); |