[SCM] kdelibs4support packaging branch, master, updated. 91b9eb08d50fbebd9aff67a4b32671fd923134ac
Maximiliano Curia
maxy at moszumanska.debian.org
Wed Mar 25 18:16:43 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kdelibs4support.git;a=commitdiff;h=86e4c39
The following commit has been merged in the master branch:
commit 86e4c39210c24cdb39d10c5583e9b5df96ca9c4a
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date: Tue Mar 24 16:55:53 2015 +0100
New patch: standarddirs_test
---
debian/changelog | 1 +
debian/patches/series | 1 +
debian/patches/standarddirs_test | 110 +++++++++++++++++++++++++++++++++++++++
3 files changed, 112 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index c95c2cb..706557f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ kdelibs4support (5.8.0-1~) UNRELEASED; urgency=medium
* New upstream release (5.7.0).
* New upstream release (5.8.0).
* Refresh patches.
+ * New patch: standarddirs_test
-- Maximiliano Curia <maxy at debian.org> Sat, 14 Mar 2015 10:23:53 +0100
diff --git a/debian/patches/series b/debian/patches/series
index 890ac8f..cb77110 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
incomplete_header
install_missing_header
renamed_header
+standarddirs_test
diff --git a/debian/patches/standarddirs_test b/debian/patches/standarddirs_test
new file mode 100644
index 0000000..dbd11d4
--- /dev/null
+++ b/debian/patches/standarddirs_test
@@ -0,0 +1,110 @@
+Index: kdelibs4support/autotests/kstandarddirstest.cpp
+===================================================================
+--- kdelibs4support.orig/autotests/kstandarddirstest.cpp 2015-03-24 17:03:15.013378363 +0100
++++ kdelibs4support/autotests/kstandarddirstest.cpp 2015-03-24 17:04:03.579382230 +0100
+@@ -108,9 +108,10 @@
+ {
+ const QStringList configDirs = KGlobal::dirs()->resourceDirs("config");
+ Q_FOREACH (const QString &dir, configDirs) {
+- QVERIFY2(dir.endsWith("xdg/")
+- || dir.endsWith("share/config/") // KDE4 compat path
+- || dir.endsWith(".kde-unit-test/xdg/config/"), qPrintable(dir));
++ QString clean = QDir::cleanPath(dir);
++ QVERIFY2(clean.endsWith("xdg")
++ || clean.endsWith("share/config") // KDE4 compat path
++ || clean.endsWith(".kde-unit-test/xdg/config"), qPrintable(clean));
+ }
+ }
+
+@@ -172,6 +173,15 @@
+ return false;
+ }
+
++static QStringList cleanThem(const QStringList &lst)
++{
++ QStringList result;
++ for (QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) {
++ result.push_back(QDir::cleanPath(*it));
++ }
++ return result;
++}
++
+ void KStandarddirsTest::testFindAllResources()
+ {
+ if (!isKdeLibs4supportInstalled()) {
+@@ -180,7 +190,8 @@
+
+ const QStringList dbusInterfaceFiles = KGlobal::dirs()->findAllResources("data", "dbus-1/interfaces/");
+ QVERIFY(!dbusInterfaceFiles.isEmpty());
+- QVERIFY(dbusInterfaceFiles.count() > 20); // I have 21 here, installed by kdelibs.
++ QVERIFY(dbusInterfaceFiles.count() >= 4); // I have 21 here, installed by kdelibs.
++ // Only 4 installed here :/
+
+ // Create a local config file, the file will be used as expected result
+ const QString localConfigFile = m_configHome + "/foorc";
+@@ -192,11 +203,12 @@
+ QVERIFY2(QFile::exists(localConfigFile), qPrintable(localConfigFile));
+
+ const QStringList configFiles = KGlobal::dirs()->findAllResources("config");
++ QStringList cleanConfigFiles = cleanThem(configFiles);
+ QVERIFY(!configFiles.isEmpty());
+ //qDebug() << configFiles;
+ QVERIFY(oneEndsWith(configFiles, "etc/xdg/kdebugrc"));
+ QVERIFY(oneEndsWith(configFiles, "etc/xdg/kdebug.areas"));
+- QVERIFY(oneEndsWith(configFiles, "kde-unit-test/xdg/config/foorc"));
++ QVERIFY(oneEndsWith(cleanConfigFiles, "kde-unit-test/xdg/config/foorc"));
+ QVERIFY(!oneEndsWith(configFiles, "etc/xdg/colors/Web.colors")); // recursive was false
+
+ {
+@@ -211,10 +223,11 @@
+ {
+ const QStringList configFilesRecursiveWithFilter = KGlobal::dirs()->findAllResources("config", "*rc",
+ KStandardDirs::Recursive);
++ QStringList cleanConfigFilesRecursiveWithFilter = cleanThem(configFilesRecursiveWithFilter);
+ QVERIFY(!configFilesRecursiveWithFilter.isEmpty());
+ //qDebug() << configFilesRecursiveWithFilter;
+ QVERIFY(configFilesRecursiveWithFilter.count() >= 2); // foorc, kdebugrc
+- QVERIFY(oneEndsWith(configFilesRecursiveWithFilter, "kde-unit-test/xdg/config/foorc"));
++ QVERIFY(oneEndsWith(cleanConfigFilesRecursiveWithFilter, "kde-unit-test/xdg/config/foorc"));
+ QVERIFY(oneEndsWith(configFilesRecursiveWithFilter, "etc/xdg/kdebugrc"));
+ QVERIFY(!oneEndsWith(configFilesRecursiveWithFilter, "etc/xdg/colors/Web.colors")); // didn't match the filter
+ }
+@@ -222,9 +235,10 @@
+ {
+ QStringList fileNames;
+ const QStringList configFilesWithFilter = KGlobal::dirs()->findAllResources("config", "*rc", KStandardDirs::NoDuplicates, fileNames);
++ QStringList cleanConfigFilesWithFilter = cleanThem(configFilesWithFilter);
+ QVERIFY(!configFilesWithFilter.isEmpty());
+ QVERIFY2(configFilesWithFilter.count() >= 2, qPrintable(configFilesWithFilter.join(",")));
+- QVERIFY(oneEndsWith(configFilesWithFilter, "kde-unit-test/xdg/config/foorc"));
++ QVERIFY(oneEndsWith(cleanConfigFilesWithFilter, "kde-unit-test/xdg/config/foorc"));
+ QVERIFY(oneEndsWith(configFilesWithFilter, "kdebugrc")); // either global (etc/xdg/) or local (XDG_HOME)
+ QVERIFY(!oneEndsWith(configFilesWithFilter, "etc/xdg/ui/ui_standards.rc")); // recursive not set
+ QVERIFY(!oneEndsWith(configFilesWithFilter, "etc/xdg/accept-languages.codes")); // didn't match the filter
+@@ -283,7 +297,7 @@
+ {
+ const QString configDir = KGlobal::dirs()->findResourceDir("config", "foorc");
+ QVERIFY(!configDir.isEmpty());
+- QVERIFY2(configDir.endsWith(QLatin1String("/xdg/config/")), qPrintable(configDir));
++ QVERIFY2(QDir::cleanPath(configDir).endsWith(QLatin1String("/xdg/config")), qPrintable(configDir));
+ }
+
+ void KStandarddirsTest::testFindExeLibExec()
+@@ -424,14 +438,14 @@
+
+ void KStandarddirsTest::testAddResourceDir()
+ {
+- const QString dir = QFileInfo(QFINDTESTDATA("kstandarddirstest.cpp")).absolutePath();
+- const QString file = "kstandarddirstest.cpp";
++ const QString dir = QFileInfo(QFINDTESTDATA("kstandarddirstest")).absolutePath();
++ const QString file = "kstandarddirstest";
+ QString ret = KStandardDirs::locate("here", file);
+ QCOMPARE(ret, QString()); // not set up yet
+
+ KGlobal::dirs()->addResourceDir("here", dir);
+ ret = KStandardDirs::locate("here", file);
+- QCOMPARE_PATHS(ret, KStandardDirs::realPath(dir) + "kstandarddirstest.cpp");
++ QCOMPARE_PATHS(ret, KStandardDirs::realPath(dir) + "kstandarddirstest");
+ }
+
+ void KStandarddirsTest::testSetXdgDataDirs()
--
kdelibs4support packaging
More information about the pkg-kde-commits
mailing list