fix packagestructure test
This commit is contained in:
parent
7cabcaa9ac
commit
aea5627ef4
@ -373,7 +373,6 @@ QStringList Package::entryList(const char *key) const
|
||||
|
||||
void Package::setPath(const QString &path)
|
||||
{
|
||||
kDebug() << "Package::setPath() " << path;
|
||||
// if the path is already what we have, don't bother
|
||||
if (path == d->path) {
|
||||
return;
|
||||
|
@ -43,10 +43,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
PackageStructureTest::PackageStructureTest()
|
||||
void PackageStructureTest::initTestCase()
|
||||
{
|
||||
m_packagePath = QString::fromLatin1(KDESRCDIR) + "signedPackage/";
|
||||
ps = Plasma::PluginLoader::self()->loadPackage("Plasma/Applet");
|
||||
m_packagePath = QString::fromLatin1(KDESRCDIR) + "testpackage";
|
||||
ps = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic");
|
||||
ps.setPath(m_packagePath);
|
||||
}
|
||||
|
||||
@ -155,10 +155,8 @@ void PackageStructureTest::requiredFiles()
|
||||
|
||||
void PackageStructureTest::path()
|
||||
{
|
||||
qDebug() << "real paths are" << ps.filePath("images") << ps.filePath("mainscript");
|
||||
qDebug() << "we wants" << QString(m_packagePath + QString("contents/images")) << QString(m_packagePath + QString("contents/code/main.js"));
|
||||
QCOMPARE(ps.filePath("images"), QFileInfo(m_packagePath + QString("contents/images")).canonicalFilePath());
|
||||
QCOMPARE(ps.filePath("mainscript"), QFileInfo(m_packagePath + QString("contents/code/main.js")).canonicalFilePath());
|
||||
QCOMPARE(ps.filePath("images"), QDir(m_packagePath + QString("/contents/images")).canonicalPath());
|
||||
QCOMPARE(ps.filePath("mainscript"), QFileInfo(m_packagePath + QString("/contents/ui/main.qml")).canonicalFilePath());
|
||||
}
|
||||
|
||||
void PackageStructureTest::name()
|
||||
|
@ -27,10 +27,8 @@ class PackageStructureTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PackageStructureTest();
|
||||
|
||||
private Q_SLOTS:
|
||||
void initTestCase();
|
||||
void copyPerformance();
|
||||
void emptyContentsPrefix();
|
||||
void multiplePaths();
|
||||
|
Loading…
x
Reference in New Issue
Block a user