Commit 7fc00820 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it more generic

parent 0aea5265
...@@ -63,8 +63,11 @@ void ExportNotesJobInterfaceTest::exportNoteConfigTest1() ...@@ -63,8 +63,11 @@ void ExportNotesJobInterfaceTest::exportNoteConfigTest1()
{ {
//Don't use setTestModeEnabled otherwise we can set env //Don't use setTestModeEnabled otherwise we can set env
//QStandardPaths::setTestModeEnabled(true); //QStandardPaths::setTestModeEnabled(true);
qputenv("XDG_DATA_HOME", PIMDATAEXPORTER_DIR "/export/test1/share"); const QByteArray pathConfig("/export/test1/");
qputenv("XDG_CONFIG_HOME", PIMDATAEXPORTER_DIR "/export/test1/config");
qputenv("XDG_DATA_HOME", QByteArray(PIMDATAEXPORTER_DIR) + pathConfig + "/share");
qputenv("XDG_CONFIG_HOME", QByteArray(PIMDATAEXPORTER_DIR) + pathConfig + "/config");
//TODO fix file name. //TODO fix file name.
const QString temporaryFile = QDir::tempPath() + QStringLiteral("/archive.zip"); const QString temporaryFile = QDir::tempPath() + QStringLiteral("/archive.zip");
...@@ -85,7 +88,7 @@ void ExportNotesJobInterfaceTest::exportNoteConfigTest1() ...@@ -85,7 +88,7 @@ void ExportNotesJobInterfaceTest::exportNoteConfigTest1()
CompareExportFile compareExportFile; CompareExportFile compareExportFile;
compareExportFile.setTempFilePath(temporaryFile); compareExportFile.setTempFilePath(temporaryFile);
compareExportFile.setListFilePath(QStringLiteral(PIMDATAEXPORTER_DIR "/export/test1")); compareExportFile.setListFilePath(QLatin1String(QByteArray(PIMDATAEXPORTER_DIR + pathConfig)));
compareExportFile.compareFiles(); compareExportFile.compareFiles();
QVERIFY(QFile(temporaryFile).remove()); QVERIFY(QFile(temporaryFile).remove());
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment