test adding files/directories to copied Package object
This commit is contained in:
parent
cbec4fda2d
commit
bc571d98e2
@ -74,6 +74,8 @@ void PackageStructureTest::mutateAfterCopy()
|
||||
const bool externalPaths = ps.allowExternalPaths();
|
||||
const QString servicePrefix = ps.servicePrefix();
|
||||
const QStringList contentsPrefixPaths = ps.contentsPrefixPaths();
|
||||
const QList<const char *> files = ps.files();
|
||||
const QList<const char *> dirs = ps.directories();
|
||||
|
||||
Plasma::Package copy(ps);
|
||||
|
||||
@ -105,6 +107,16 @@ void PackageStructureTest::mutateAfterCopy()
|
||||
QCOMPARE(ps.contentsPrefixPaths(), contentsPrefixPaths);
|
||||
QCOMPARE(copy.contentsPrefixPaths(), copyContentsPrefixPaths);
|
||||
|
||||
copy = ps;
|
||||
copy.addFileDefinition("nonsense", "foobar", QString());
|
||||
QCOMPARE(ps.files(), files);
|
||||
QVERIFY(ps.files() != copy.files());
|
||||
|
||||
copy = ps;
|
||||
copy.addDirectoryDefinition("nonsense", "foobar", QString());
|
||||
QCOMPARE(ps.directories(), dirs);
|
||||
QVERIFY(ps.directories() != copy.directories());
|
||||
|
||||
#ifndef PLASMA_NO_PACKAGE_EXTRADATA
|
||||
copy = ps;
|
||||
QVERIFY(!imageMimeTypes.isEmpty());
|
||||
|
Loading…
Reference in New Issue
Block a user