diff options
author | Aleix Pol <aleixpol@kde.org> | 2018-07-16 17:53:22 +0200 |
---|---|---|
committer | Aleix Pol <aleixpol@kde.org> | 2018-09-28 19:01:12 +0200 |
commit | 5f340fc84d89df83d17199c1aa8586d698c8c910 (patch) | |
tree | 1f84f6a59379be133a6a79f5b19b8d3407671ed5 /autotests/kconfigtest.cpp | |
parent | 217c0b00f531e0bc93dc75457dbc15df3adb8826 (diff) | |
download | kconfig-5f340fc84d89df83d17199c1aa8586d698c8c910.tar.gz kconfig-5f340fc84d89df83d17199c1aa8586d698c8c910.tar.bz2 |
Fix issue when reading path lists
Summary: They were not being split properly.
Test Plan: Tests pass, including the new one.
Reviewers: #frameworks, dfaure
Reviewed By: dfaure
Subscribers: dfaure, anthonyfieroni, kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14162
Diffstat (limited to 'autotests/kconfigtest.cpp')
-rw-r--r-- | autotests/kconfigtest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp index 4ae6d5b8..35075d1a 100644 --- a/autotests/kconfigtest.cpp +++ b/autotests/kconfigtest.cpp @@ -521,7 +521,9 @@ void KConfigTest::testPath() << "withBraces[$e]=file://${HOME}/foo" << endl << "URL[$e]=file://${HOME}/foo" << endl << "hostname[$e]=$(hostname)" << endl - << "noeol=foo"; // no EOL + << "escapes=aaa,bb/b,ccc\\,ccc" << endl + << "noeol=foo" // no EOL + ; } KConfig cf2(TEST_SUBDIR "pathtest"); KConfigGroup group = cf2.group("Test Group"); @@ -547,6 +549,9 @@ void KConfigTest::testPath() #endif QVERIFY(group.hasKey("noeol")); QCOMPARE(group.readEntry("noeol", QString()), QString("foo")); + + const auto val = QStringList { QStringLiteral("aaa"), QStringLiteral("bb/b"), QStringLiteral("ccc,ccc")}; + QCOMPARE(group.readPathEntry("escapes", QStringList()), val); } void KConfigTest::testPersistenceOfExpandFlagForPath() |