| 217 | } |
| 218 | |
| 219 | void TestQuaZip::setOsCode() |
| 220 | { |
| 221 | QFETCH(QString, zipName); |
| 222 | QFETCH(uint, osCode); |
| 223 | QuaZip testZip(zipName); |
| 224 | testZip.setOsCode(osCode); |
| 225 | testZip.open(QuaZip::mdCreate); |
| 226 | QCOMPARE(testZip.getOsCode(), osCode); |
| 227 | QuaZipFile testZipFile(&testZip); |
| 228 | testZipFile.open(QIODevice::WriteOnly, QuaZipNewInfo("test.txt")); |
| 229 | testZipFile.close(); |
| 230 | testZip.close(); |
| 231 | QuaZip checkZip(zipName); |
| 232 | checkZip.open(QuaZip::mdUnzip); |
| 233 | checkZip.goToFirstFile(); |
| 234 | QuaZipFileInfo64 fi; |
| 235 | QVERIFY(checkZip.getCurrentFileInfo(&fi)); |
| 236 | QCOMPARE(static_cast<uint>(fi.versionCreated) >> 8, osCode); |
| 237 | checkZip.close(); |
| 238 | QDir().remove(zipName); |
| 239 | } |
| 240 | |
| 241 | void TestQuaZip::setDataDescriptorWritingEnabled() |
| 242 | { |
nothing calls this directly
no test coverage detected