fix tests

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=879114
This commit is contained in:
Anne-Marie Mahfouf 2008-11-02 13:14:38 +00:00
parent 0af4b7d132
commit cde5d1a29f

View File

@ -29,7 +29,7 @@
void PlasmoidPackageTest::init()
{
mPackage = QString("Package");
mPackageRoot = QDir::homePath() + "/.kde-unit-test/packageRoot/";
mPackageRoot = QDir::homePath() + "/.kde-unit-test/packageRoot";
ps = Plasma::Applet::packageStructure();
}
@ -41,7 +41,7 @@ void PlasmoidPackageTest::cleanup()
}
// Clean things up.
QDir local = QDir::homePath() + QLatin1String("/.kde-unit-test/packageRoot/");
QDir local = QDir::homePath() + QLatin1String("/.kde-unit-test/packageRoot");
foreach(const QString &dir, local.entryList(QDir::Dirs)) {
removeDir(QLatin1String("packageRoot/" + dir.toLatin1() + "/contents/code"));
removeDir(QLatin1String("packageRoot/" + dir.toLatin1() + "/contents/images"));
@ -202,11 +202,11 @@ void PlasmoidPackageTest::filePath()
// Two ways to get the same info.
// 1. Give the file type which refers to a class of files (a directory) in
// the package strucutre and the file name.
// the package structure and the file name.
// 2. Give the file type which refers to a file in the package structure.
//
// NOTE: scripts, main and mainscript are defined in packages.cpp and are
// specific for a PlasmoidPackag.
// specific for a PlasmoidPackage.
QCOMPARE(p->filePath("scripts", "main"), path);
QCOMPARE(p->filePath("mainscript"), path);
}
@ -287,7 +287,7 @@ void PlasmoidPackageTest::metadata()
QString path = mPackageRoot + '/' + plasmoid + "/metadata.desktop";
p = new Plasma::Package(mPackageRoot, plasmoid, ps);
const Plasma::PackageMetadata metadata = p->metadata();
QVERIFY(metadata.isValid());
QVERIFY(p->isValid());
QCOMPARE(metadata.name(), plasmoid);
}