test passes now
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=824841
This commit is contained in:
parent
41d8ae9752
commit
3bd5f495e0
@ -25,24 +25,20 @@
|
|||||||
void PackageMetadataTest::init()
|
void PackageMetadataTest::init()
|
||||||
{
|
{
|
||||||
pm = new Plasma::PackageMetadata;
|
pm = new Plasma::PackageMetadata;
|
||||||
|
|
||||||
// Create data dir
|
// Create data dir
|
||||||
mDataDir = QDir::homePath() + "/.kde-unit-test/share/config";
|
mDataDir = QDir::homePath() + "/.kde-unit-test/share/config/";
|
||||||
QVERIFY(QDir().mkpath(mDataDir));
|
QVERIFY(QDir().mkpath(mDataDir));
|
||||||
|
|
||||||
QDir dir(mDataDir);
|
QDir dir(mDataDir);
|
||||||
QFile::copy(QString::fromLatin1(KDESRCDIR)
|
QFile::copy(QString::fromLatin1(KDESRCDIR)
|
||||||
+ QLatin1String("/packagemetadatatest.desktop"), mDataDir
|
+ QLatin1String("packagemetadatatest.desktop"), mDataDir
|
||||||
+ QLatin1String("/packagemetadatatest.desktop"));
|
+ QLatin1String("packagemetadatatest.desktop"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PackageMetadataTest::cleanup()
|
void PackageMetadataTest::cleanup()
|
||||||
{
|
{
|
||||||
delete pm;
|
delete pm;
|
||||||
|
|
||||||
// Clean things up.
|
|
||||||
removeDir(QLatin1String("share/config"));
|
|
||||||
QDir().rmpath(QDir::homePath() + "/.kde-unit-test/share");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copied from ktimezonetest.h
|
// Copied from ktimezonetest.h
|
||||||
@ -65,8 +61,8 @@ void PackageMetadataTest::read()
|
|||||||
|
|
||||||
QVERIFY(pm->isValid());
|
QVERIFY(pm->isValid());
|
||||||
|
|
||||||
QCOMPARE(pm->name(), QString("test"));
|
QCOMPARE(pm->name(), QString("Package metadata test file"));
|
||||||
QCOMPARE(pm->description(), QString("Some fancy test description"));
|
QCOMPARE(pm->description(), QString("A test desktop file to test the PackageMetaData class."));
|
||||||
QCOMPARE(pm->serviceType(), QString("Plasma/Applet"));
|
QCOMPARE(pm->serviceType(), QString("Plasma/Applet"));
|
||||||
QCOMPARE(pm->author(), QString("Bertjan Broeksema"));
|
QCOMPARE(pm->author(), QString("Bertjan Broeksema"));
|
||||||
QCOMPARE(pm->email(), QString("b.broeksema@kdemail.net"));
|
QCOMPARE(pm->email(), QString("b.broeksema@kdemail.net"));
|
||||||
@ -80,8 +76,8 @@ void PackageMetadataTest::read()
|
|||||||
|
|
||||||
void PackageMetadataTest::write()
|
void PackageMetadataTest::write()
|
||||||
{
|
{
|
||||||
pm->setName(QString("Package metadata test file"));
|
pm->setName(QString("Package metadata test file copy"));
|
||||||
pm->setDescription(QString("Some fancy test description"));
|
pm->setDescription(QString("Some other fancy test description"));
|
||||||
pm->setServiceType(QString("Plasma/Applet"));
|
pm->setServiceType(QString("Plasma/Applet"));
|
||||||
pm->setAuthor(QString("Bertjan Broeksema"));
|
pm->setAuthor(QString("Bertjan Broeksema"));
|
||||||
pm->setEmail(QString("b.broeksema@kdemail.net"));
|
pm->setEmail(QString("b.broeksema@kdemail.net"));
|
||||||
@ -90,14 +86,14 @@ void PackageMetadataTest::write()
|
|||||||
pm->setLicense(QString("GPL"));
|
pm->setLicense(QString("GPL"));
|
||||||
pm->setApplication(QString("A Test name"));
|
pm->setApplication(QString("A Test name"));
|
||||||
pm->setRequiredVersion(QString("1.2.3"));
|
pm->setRequiredVersion(QString("1.2.3"));
|
||||||
|
|
||||||
pm->write("somefile.desktop");
|
pm->write(mDataDir + "somefile.desktop");
|
||||||
delete pm;
|
delete pm;
|
||||||
|
|
||||||
pm = new Plasma::PackageMetadata("somefile.desktop");
|
pm = new Plasma::PackageMetadata(mDataDir + "somefile.desktop");
|
||||||
|
|
||||||
QCOMPARE(pm->name(), QString("Package metadata test file"));
|
QCOMPARE(pm->name(), QString("Package metadata test file copy"));
|
||||||
QCOMPARE(pm->description(), QString("Some fancy test description"));
|
QCOMPARE(pm->description(), QString("Some other fancy test description"));
|
||||||
QCOMPARE(pm->serviceType(), QString("Plasma/Applet"));
|
QCOMPARE(pm->serviceType(), QString("Plasma/Applet"));
|
||||||
QCOMPARE(pm->author(), QString("Bertjan Broeksema"));
|
QCOMPARE(pm->author(), QString("Bertjan Broeksema"));
|
||||||
QCOMPARE(pm->email(), QString("b.broeksema@kdemail.net"));
|
QCOMPARE(pm->email(), QString("b.broeksema@kdemail.net"));
|
||||||
|
@ -85,47 +85,6 @@ Icon=test
|
|||||||
Type=Service
|
Type=Service
|
||||||
X-KDE-ServiceTypes=Plasma/Applet
|
X-KDE-ServiceTypes=Plasma/Applet
|
||||||
|
|
||||||
Description=Some fancy test description
|
|
||||||
Description[ca]=Alguna descripció de proves imaginativa
|
|
||||||
Description[da]=En eller anden fin testbeskrivelse
|
|
||||||
Description[de]=Eine lustige Test-Beschreibung
|
|
||||||
Description[el]=Μια δοκιμαστική περιγραφή
|
|
||||||
Description[eo]=Komplika testa priskribo
|
|
||||||
Description[es]=Algunas descripciones adornadas de prueba
|
|
||||||
Description[et]=Vahva testikirjeldus
|
|
||||||
Description[fi]=Joku metka testikuvaus
|
|
||||||
Description[fr]=Une description fantaisiste pour le test
|
|
||||||
Description[fy]=In elegante testomskriuwing
|
|
||||||
Description[ga]=Cur síos ar thástáil chasta
|
|
||||||
Description[gl]=Unha descrición de proba
|
|
||||||
Description[gu]=કેટલુંક આકર્ષક ચકાસણી વર્ણન
|
|
||||||
Description[hu]=Tesztleírás
|
|
||||||
Description[is]=Einhver krassandi lýsing til prufu
|
|
||||||
Description[it]=Una descrizione fantasiosa del test
|
|
||||||
Description[km]=សេចក្ដីពិពណ៌នាការសាកល្បងដ៏ប្រសើរមួយចំនួន
|
|
||||||
Description[ko]=좀 흥미있는 테스트 설명
|
|
||||||
Description[lv]=Skaists teksta apraksts
|
|
||||||
Description[nb]=En flott testbeskrivelse
|
|
||||||
Description[nds]=Jichtenseen smuck Testbeschrieven
|
|
||||||
Description[nl]=Een elegante testbeschrijving
|
|
||||||
Description[nn]=Ei flott testskildring
|
|
||||||
Description[pa]=ਕੁਝ ਫੈਂਸੀ ਟੈਸਟ ਵੇਰਵਾ
|
|
||||||
Description[pl]=Jakiś opis testowy
|
|
||||||
Description[pt]=Uma descrição de teste bonita
|
|
||||||
Description[pt_BR]=Alguma descrição de teste interessante
|
|
||||||
Description[ro]=O descriere de test chichi
|
|
||||||
Description[se]=Somás geahččalanválddahus
|
|
||||||
Description[sl]=Zanimiv preizkusni opis
|
|
||||||
Description[sr]=Некакав звучан опис пробе
|
|
||||||
Description[sr@latin]=Nekakav zvučan opis probe
|
|
||||||
Description[sv]=Någon utstuderad testbeskrivning
|
|
||||||
Description[th]=คำอธิบายการทดสอบแบบแฟนซีบางตัว
|
|
||||||
Description[tr]=Bazı eğlenceli test tanımlamaları
|
|
||||||
Description[uk]=Якийсь опис для тесту
|
|
||||||
Description[x-test]=xxSome fancy test descriptionxx
|
|
||||||
Description[zh_CN]=一些精美的测试描述
|
|
||||||
Description[zh_TW]=一些花俏的測試描述
|
|
||||||
|
|
||||||
X-KDE-Screenshot=a_not_default_file.svg
|
X-KDE-Screenshot=a_not_default_file.svg
|
||||||
X-KDE-Library=some_test_library
|
X-KDE-Library=some_test_library
|
||||||
X-KDE-PluginInfo-Author=Bertjan Broeksema
|
X-KDE-PluginInfo-Author=Bertjan Broeksema
|
||||||
|
Loading…
x
Reference in New Issue
Block a user