D9097: KConfig: fix double slash when an env var ends with a slash.

David Faure noreply at phabricator.kde.org
Sat Dec 2 09:04:51 UTC 2017


dfaure created this revision.
dfaure added reviewers: mdawson, apol, mpyne.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  The CI has $HOME=/home/jenkins/ with a trailing slash, which leads to
  FAIL!  : KConfigTest::testPath() Compared values are not the same
  
    Actual   (sc3.readPathEntry("homepath", QString())): "/home/jenkins//foo"
    Expected (HOMEPATH): "/home/jenkins/foo"
  
  The fix is to also replace the '/' in "$HOME/", when the env var ends
  with '/' and there is indeed a '/' after the env var in the source
  string.

TEST PLAN
  kconfigtest now passes with HOME=/home/dfaure/, and the newly
  added unittest passes.

REPOSITORY
  R237 KConfig

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D9097

AFFECTED FILES
  autotests/kconfigtest.cpp
  src/core/kconfig.cpp

To: dfaure, mdawson, apol, mpyne
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171202/2c5520a6/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list