Commit ee5c770f authored by Pino Toscano's avatar Pino Toscano

tests: fix signature from command w/ spaces in path

properly quote the filename as argument for 'cat', so the command for
setting the signature works
parent 8e7da7b6
......@@ -4,4 +4,4 @@ find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
ecm_add_tests( identitytest.cpp signaturetest.cpp NAME_PREFIX "kpimidentity-" LINK_LIBRARIES KF5IdentityManagement
KF5::PimTextEdit Qt5::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::IconThemes)
KF5::PimTextEdit Qt5::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::IconThemes KF5::CoreAddons)
......@@ -32,6 +32,7 @@
#include <KConfig>
#include <QDir>
#include <KActionCollection>
#include <KShell>
#include <kpimtextedit/richtextcomposer.h>
#include <kpimtextedit/richtextcomposercontroler.h>
......@@ -91,7 +92,7 @@ void SignatureTester::testSignatures()
QString fileContent = QString::fromUtf8(thisFile.readAll());
Signature sig3;
sig3.setPath(QStringLiteral("cat ") + QStringLiteral(__FILE__), true);
sig3.setPath(QStringLiteral("cat ") + KShell::quoteArg(QStringLiteral(__FILE__)), true);
QCOMPARE(sig3.rawText(), fileContent);
QVERIFY(!sig3.isInlinedHtml());
QVERIFY(sig3.text().isEmpty());
......
Markdown is supported
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