fixes for tests.. not quite 100% yet, but getting there.
This commit is contained in:
parent
32f75b826c
commit
d89eebe1be
@ -33,21 +33,23 @@ public:
|
|||||||
{
|
{
|
||||||
setContentsPrefixPaths(QStringList());
|
setContentsPrefixPaths(QStringList());
|
||||||
addDirectoryDefinition("bin", "bin", "bin");
|
addDirectoryDefinition("bin", "bin", "bin");
|
||||||
|
setPath("/");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void PackageStructureTest::init()
|
void PackageStructureTest::init()
|
||||||
{
|
{
|
||||||
|
m_packagePath = QString::fromLatin1(KDESRCDIR) + "signedPackage/";
|
||||||
ps = Plasma::Package::load("Plasma/Applet");
|
ps = Plasma::Package::load("Plasma/Applet");
|
||||||
|
ps.setPath(m_packagePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PackageStructureTest::emptyContentsPrefix()
|
void PackageStructureTest::emptyContentsPrefix()
|
||||||
{
|
{
|
||||||
NoPrefixes package;
|
NoPrefixes package;
|
||||||
package.setPath("/");
|
|
||||||
QString path(package.filePath("bin", "ls"));
|
QString path(package.filePath("bin", "ls"));
|
||||||
qDebug() << path;
|
//qDebug() << path;
|
||||||
QCOMPARE(path, QString("/bin/ls"));
|
QCOMPARE(path, QString("/bin/ls"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,8 +104,10 @@ void PackageStructureTest::requiredFiles()
|
|||||||
|
|
||||||
void PackageStructureTest::path()
|
void PackageStructureTest::path()
|
||||||
{
|
{
|
||||||
QCOMPARE(ps.filePath("images"), QString("images"));
|
qDebug() << "real paths are" << ps.filePath("images") << ps.filePath("mainscript");
|
||||||
QCOMPARE(ps.filePath("mainscript"), QString("code/main"));
|
qDebug() << "we wants" << QString(m_packagePath + QString("contents/images")) << QString(m_packagePath + QString("contents/code/main.js"));
|
||||||
|
QCOMPARE(ps.filePath("images"), QString(m_packagePath + QString("contents/images")));
|
||||||
|
QCOMPARE(ps.filePath("mainscript"), QString(m_packagePath + QString("contents/code/main.js")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PackageStructureTest::name()
|
void PackageStructureTest::name()
|
||||||
|
@ -47,6 +47,7 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Plasma::Package ps;
|
Plasma::Package ps;
|
||||||
|
QString m_packagePath;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,3 +19,4 @@ X-KDE-PluginInfo-Depends=
|
|||||||
X-KDE-PluginInfo-License=GPL
|
X-KDE-PluginInfo-License=GPL
|
||||||
|
|
||||||
X-Plasma-OptionalExtensions=http
|
X-Plasma-OptionalExtensions=http
|
||||||
|
X-Plasma-MainScript=code/main.js
|
||||||
|
Loading…
Reference in New Issue
Block a user