From 76e5b4412782b9c1757c8cdb3984f99566a57b96 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 2 May 2015 00:16:55 +0200 Subject: Fix kconf_update for spaces in paths (CI says it happens on OSX) Unittest it on Linux by exporting XDG_DATA_HOME with a space in it. CCMAIL: kde-mac@kde.org --- autotests/test_kconf_update.cpp | 6 ++++++ autotests/test_kconf_update.h | 1 + 2 files changed, 7 insertions(+) (limited to 'autotests') diff --git a/autotests/test_kconf_update.cpp b/autotests/test_kconf_update.cpp index 86553a21..baa4dc56 100644 --- a/autotests/test_kconf_update.cpp +++ b/autotests/test_kconf_update.cpp @@ -33,6 +33,12 @@ QTEST_GUILESS_MAIN(TestKConfUpdate) +void TestKConfUpdate::initTestCase() +{ + // 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"); +} + static void writeFile(const QString &path, const QString &content) { QFile file(path); diff --git a/autotests/test_kconf_update.h b/autotests/test_kconf_update.h index 1b3151f1..ca8fe3ba 100644 --- a/autotests/test_kconf_update.h +++ b/autotests/test_kconf_update.h @@ -27,6 +27,7 @@ class TestKConfUpdate : public QObject { Q_OBJECT private Q_SLOTS: + void initTestCase(); void test_data(); void test(); void testScript_data(); -- cgit v1.2.1