summaryrefslogtreecommitdiffstats
path: root/tests/auto/qzip/tst_qzip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qzip/tst_qzip.cpp')
-rw-r--r--tests/auto/qzip/tst_qzip.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qzip/tst_qzip.cpp b/tests/auto/qzip/tst_qzip.cpp
index d7fc2f7..cb3acf5 100644
--- a/tests/auto/qzip/tst_qzip.cpp
+++ b/tests/auto/qzip/tst_qzip.cpp
@@ -77,6 +77,7 @@ void tst_QZip::basicUnpack()
QCOMPARE(files.count(), 2);
QZipReader::FileInfo fi = files.at(0);
+ QVERIFY(fi.isValid());
QCOMPARE(fi.filePath, QString("test/"));
QCOMPARE(uint(fi.isDir), (uint) 1);
QCOMPARE(uint(fi.isFile), (uint) 0);
@@ -85,7 +86,10 @@ void tst_QZip::basicUnpack()
QCOMPARE(fi.permissions,QFile::Permissions( QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner
| QFile::ReadUser | QFile::WriteUser | QFile::ExeUser ));
+ QCOMPARE(fi.lastModified, QDateTime::fromString("2005.11.11 13:08:02", "yyyy.MM.dd HH:mm:ss"));
+
fi = files.at(1);
+ QVERIFY(fi.isValid());
QCOMPARE(fi.filePath, QString("test/test.txt"));
QCOMPARE(uint(fi.isDir), (uint) 0);
QCOMPARE(uint(fi.isFile), (uint) 1);
@@ -94,7 +98,12 @@ void tst_QZip::basicUnpack()
QVERIFY(fi.permissions == QFile::Permissions( QFile::ReadOwner | QFile::WriteOwner
| QFile::ReadUser | QFile::WriteUser ));
+ QCOMPARE(fi.lastModified, QDateTime::fromString("2005.11.11 13:08:02", "yyyy.MM.dd HH:mm:ss"));
+
QCOMPARE(zip.fileData("test/test.txt"), QByteArray("content\n"));
+
+ fi = files.at(-1);
+ QVERIFY(!fi.isValid());
}
void tst_QZip::symlinks()
@@ -104,6 +113,7 @@ void tst_QZip::symlinks()
QCOMPARE(files.count(), 2);
QZipReader::FileInfo fi = files.at(0);
+ QVERIFY(fi.isValid());
QCOMPARE(fi.filePath, QString("symlink"));
QVERIFY(!fi.isDir);
QVERIFY(!fi.isFile);
@@ -112,6 +122,7 @@ void tst_QZip::symlinks()
QCOMPARE(zip.fileData("symlink"), QByteArray("destination"));
fi = files.at(1);
+ QVERIFY(fi.isValid());
QCOMPARE(fi.filePath, QString("destination"));
QVERIFY(!fi.isDir);
QVERIFY(fi.isFile);