MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / filePath

Method filePath

lib/QuaZip/qztest/testquazipdir.cpp:325–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325void TestQuaZipDir::filePath()
326{
327 QString zipName = "entryInfoList.zip";
328 QStringList fileNames;
329 fileNames << "root.txt" << "dir/test.txt";
330 if (!createTestFiles(fileNames)) {
331 QFAIL("Couldn't create test files");
332 }
333 if (!createTestArchive(zipName, fileNames)) {
334 QFAIL("Couldn't create test archive");
335 }
336 removeTestFiles(fileNames);
337 QuaZip zip(zipName);
338 QDir curDir;
339 QVERIFY(zip.open(QuaZip::mdUnzip));
340 QuaZipDir dir(&zip);
341 QVERIFY(dir.cd("dir"));
342 QCOMPARE(dir.relativeFilePath("/root.txt"),
343 QString::fromLatin1("../root.txt"));
344 QCOMPARE(dir.filePath("test.txt"),
345 QString::fromLatin1("dir/test.txt"));
346 zip.close();
347 curDir.remove(zipName);
348}

Callers 1

foreachFunction · 0.45

Calls 8

createTestFilesFunction · 0.85
createTestArchiveFunction · 0.85
removeTestFilesFunction · 0.85
relativeFilePathMethod · 0.80
openMethod · 0.45
cdMethod · 0.45
closeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected