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