skip man:/ tests if the protocol file isn't installed (kdebase not installed)

svn path=/trunk/KDE/kdelibs/; revision=1205004
This commit is contained in:
David Faure 2010-12-09 23:51:31 +00:00
parent 9c9499cfbb
commit 125db2a0ad

View File

@ -19,6 +19,7 @@
#include "runnercontexttest.h"
#include <kprotocolinfo.h>
#include "plasma/runnercontext.h"
Q_DECLARE_METATYPE(Plasma::RunnerContext::Type)
@ -28,8 +29,10 @@ void RunnerContextTest::typeDetection_data()
QTest::addColumn<QString>("url");
QTest::addColumn<Plasma::RunnerContext::Type>("type");
QTest::newRow("man page listing") << "man:/" << Plasma::RunnerContext::NetworkLocation;
QTest::newRow("ls man page listing") << "man://ls" << Plasma::RunnerContext::NetworkLocation;
if (KProtocolInfo::isKnownProtocol("man")) {
QTest::newRow("man page listing") << "man:/" << Plasma::RunnerContext::NetworkLocation;
QTest::newRow("ls man page listing") << "man://ls" << Plasma::RunnerContext::NetworkLocation;
}
QTest::newRow("http without host") << "http://" << Plasma::RunnerContext::UnknownType;
QTest::newRow("http with host") << "http://kde.org" << Plasma::RunnerContext::NetworkLocation;
QTest::newRow("file double slash") << "file://home" << Plasma::RunnerContext::Directory;