Commit 9bdde55b authored by Elvis Angelaccio's avatar Elvis Angelaccio
Browse files

Fix failing clirartest if rar is not available

Whether the rar plugin is read-only depends on whether rar is installed.
parent dd01a6d4
Pipeline #179279 passed with stage
in 4 minutes and 54 seconds
......@@ -13,6 +13,7 @@
#include <QFile>
#include <QSignalSpy>
#include <QStandardPaths>
#include <QTest>
#include <QTextStream>
......@@ -48,11 +49,13 @@ void CliRarTest::testArchive_data()
QTest::addColumn<Archive::EncryptionType>("expectedEncryptionType");
QTest::addColumn<QString>("expectedSubfolderName");
const bool hasRar = !QStandardPaths::findExecutable(QStringLiteral("rar")).isEmpty();
QString archivePath = QFINDTESTDATA("data/one_toplevel_folder.rar");
QTest::newRow("archive with one top-level folder")
<< archivePath
<< QFileInfo(archivePath).fileName()
<< false << true << Archive::Unencrypted
<< !hasRar << true << Archive::Unencrypted
<< QStringLiteral("A");
archivePath = QFINDTESTDATA("data/locked_archive.rar");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment