Changeset View
Changeset View
Standalone View
Standalone View
autotests/kerfuffle/extracttest.cpp
Show First 20 Lines • Show All 476 Lines • ▼ Show 20 Line(s) | |||||
477 | void ExtractTest::testPreservePermissions_data() | 477 | void ExtractTest::testPreservePermissions_data() | ||
478 | { | 478 | { | ||
479 | QTest::addColumn<QString>("archiveName"); | 479 | QTest::addColumn<QString>("archiveName"); | ||
480 | QTest::addColumn<Plugin*>("plugin"); | 480 | QTest::addColumn<Plugin*>("plugin"); | ||
481 | QTest::addColumn<QString>("testFile"); | 481 | QTest::addColumn<QString>("testFile"); | ||
482 | QTest::addColumn<int>("expectedPermissions"); | 482 | QTest::addColumn<int>("expectedPermissions"); | ||
483 | 483 | | |||
484 | // Repeat the same test case for each format and for each plugin supporting the format. | 484 | // Repeat the same test case for each format and for each plugin supporting the format. | ||
485 | foreach (const QString &format, TestHelper::testFormats()) { | 485 | const QStringList formats = TestHelper::testFormats(); | ||
486 | for (const QString &format : formats) { | ||||
elvisangelaccio: Please call this variable `formats` | |||||
486 | const QString filename = QFINDTESTDATA(QStringLiteral("data/test_permissions.%1").arg(format)); | 487 | const QString filename = QFINDTESTDATA(QStringLiteral("data/test_permissions.%1").arg(format)); | ||
487 | const auto mime = QMimeDatabase().mimeTypeForFile(filename, QMimeDatabase::MatchExtension); | 488 | const auto mime = QMimeDatabase().mimeTypeForFile(filename, QMimeDatabase::MatchExtension); | ||
488 | const auto plugins = m_pluginManager.preferredWritePluginsFor(mime); | 489 | const auto plugins = m_pluginManager.preferredWritePluginsFor(mime); | ||
489 | foreach (const auto plugin, plugins) { | 490 | for (const auto plugin : plugins) { | ||
490 | QTest::newRow(QStringLiteral("test preserve 0755 permissions (%1, %2)").arg(format, plugin->metaData().pluginId()).toUtf8().constData()) | 491 | QTest::newRow(QStringLiteral("test preserve 0755 permissions (%1, %2)").arg(format, plugin->metaData().pluginId()).toUtf8().constData()) | ||
491 | << filename | 492 | << filename | ||
492 | << plugin | 493 | << plugin | ||
493 | << QStringLiteral("0755.sh") | 494 | << QStringLiteral("0755.sh") | ||
494 | << 0755; | 495 | << 0755; | ||
495 | } | 496 | } | ||
496 | } | 497 | } | ||
497 | } | 498 | } | ||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |
Please call this variable formats