diff options
author | David Faure <faure@kde.org> | 2015-08-05 10:00:33 +0200 |
---|---|---|
committer | David Faure <faure@kde.org> | 2015-08-05 10:00:33 +0200 |
commit | 27e145e797a265de93cc1238d6e6ee5d3f3c1998 (patch) | |
tree | 76e8c37ea9e290ef571aa4d153c1563c5f359d12 /autotests/test_kconf_update.cpp | |
parent | e537a69c5f8c86a5c291764fd89b7a0ffe233606 (diff) | |
download | kconfig-27e145e797a265de93cc1238d6e6ee5d3f3c1998.tar.gz kconfig-27e145e797a265de93cc1238d6e6ee5d3f3c1998.tar.bz2 |
test_kconf_update: use QStandardPaths test mode
to avoid touching the user's real files
Diffstat (limited to 'autotests/test_kconf_update.cpp')
-rw-r--r-- | autotests/test_kconf_update.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/autotests/test_kconf_update.cpp b/autotests/test_kconf_update.cpp index dc03f9ff..41806194 100644 --- a/autotests/test_kconf_update.cpp +++ b/autotests/test_kconf_update.cpp @@ -35,6 +35,8 @@ QTEST_GUILESS_MAIN(TestKConfUpdate) void TestKConfUpdate::initTestCase() { + QStandardPaths::setTestModeEnabled(true); + // Ensure it all works with spaces in paths (as happens more commonly on OSX where it's ~/Library/Application Support/) qputenv("XDG_DATA_HOME", "/tmp/a b"); } @@ -76,7 +78,7 @@ static QTemporaryFile *writeUpdFile(const QString &content) static void runKConfUpdate(const QString &updPath) { QVERIFY(QFile::exists(KCONF_UPDATE_EXECUTABLE)); - QCOMPARE(0, QProcess::execute(KCONF_UPDATE_EXECUTABLE, QStringList() << "--debug" << updPath)); + QCOMPARE(0, QProcess::execute(KCONF_UPDATE_EXECUTABLE, QStringList() << "--testmode" << "--debug" << updPath)); } void TestKConfUpdate::test_data() |