43
43
void testThemesRelativePathWithParentXDGDATA();
44
44
void testThemesRelativePathWithParentNoVariablesSet();
45
45
void testThemesRelativePathWithParentOneXDGPathSet();
46
void testNoImportPathSet();
47
void testBogusImportPathSet();
48
void testMultipleImportPathsSet();
48
51
void tst_UCTheme::initTestCase()
192
195
QCOMPARE(component != NULL, true);
193
196
QCOMPARE(component->status(), QQmlComponent::Ready);}
198
void tst_UCTheme::testNoImportPathSet()
200
if (!QFile(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) + "/Ubuntu/Components").exists())
201
QSKIP("This can only be tested if the UITK is installed");
203
qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", "");
204
qputenv("XDG_DATA_DIRS", "");
205
qputenv("QML2_IMPORT_PATH", "");
208
QCOMPARE(theme.name(), QString("Ubuntu.Components.Themes.Ambiance"));
211
void tst_UCTheme::testBogusImportPathSet()
213
if (!QFile(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) + "/Ubuntu/Components").exists())
214
QSKIP("This can only be tested if the UITK is installed");
216
qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", "");
217
qputenv("XDG_DATA_DIRS", "");
218
qputenv("QML2_IMPORT_PATH", "/no/plugins/here");
221
QCOMPARE(theme.name(), QString("Ubuntu.Components.Themes.Ambiance"));
224
void tst_UCTheme::testMultipleImportPathsSet()
226
if (!QFile(QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) + "/Ubuntu/Components").exists())
227
QSKIP("This can only be tested if the UITK is installed");
229
qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", "");
230
qputenv("XDG_DATA_DIRS", "");
231
qputenv("QML2_IMPORT_PATH", "/no/plugins/here:.");
234
theme.setName("TestModule.TestTheme");
195
237
QTEST_MAIN(tst_UCTheme)
197
239
#include "tst_theme_enginetest.moc"