summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Sitter <sitter@kde.org>2015-11-25 11:54:21 (GMT)
committerHarald Sitter <sitter@kde.org>2015-11-25 12:01:47 (GMT)
commit87b63720efe66fd80bc11a3f02b54ad929c4fa51 (patch)
tree408f9facde1c35968f956ed164a4ae29d865f535
parentd8ba4ada501aed26217ecbd6e2ed3ec9a49897d6 (diff)
add a test for qt5 mapping
-rw-r--r--autotests/findertest.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/autotests/findertest.cpp b/autotests/findertest.cpp
index 76a09fb..a153bac 100644
--- a/autotests/findertest.cpp
+++ b/autotests/findertest.cpp
@@ -102,6 +102,23 @@ private Q_SLOTS:
QVERIFY(spy.wait());
QCOMPARE(spy.count(), 1);
}
+
+ void testQt5()
+ {
+ QApt::Backend apt;
+ apt.init();
+ apt.removePackages(QApt::PackageList() << apt.package("qtsvg5-dbg"));
+
+ DebugFinder finder;
+ QSignalSpy spy(&finder, &DebugFinder::foundDbgPkg);
+ QMetaObject::invokeMethod(&finder, "find", Qt::QueuedConnection,
+ Q_ARG(QString, QString("/usr/lib/x86_64-linux-gnu/libQt5Svg.so.5")));
+ QVERIFY(spy.wait());
+ QCOMPARE(spy.count(), 1);
+ QList<QVariant> sig = spy.takeAt(0);
+ QCOMPARE(sig.count(), 1); // 1 arg
+ QCOMPARE(sig.at(0).toString(), QStringLiteral("qtsvg5-dbg"));
+ }
};
QTEST_MAIN(FinderTest)