Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Data Exporter
Commits
f0b5bc58
Commit
f0b5bc58
authored
Apr 30, 2020
by
Laurent Montel
Browse files
Use CompareExportFile
parent
26819f91
Changes
11
Hide whitespace changes
Inline
Side-by-side
core/autotests/addressbook/CMakeLists.txt
View file @
f0b5bc58
add_definitions
(
-DPIMDATAEXPORTER_DIR=
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/data"
)
set
(
exportaddressbookjobinterfacetest_SRCS exportaddressbookjobinterfacetest.cpp
../resourceconvertertest.cpp
)
set
(
exportaddressbookjobinterfacetest_SRCS exportaddressbookjobinterfacetest.cpp
)
add_executable
(
exportaddressbookjobinterfacetest
${
exportaddressbookjobinterfacetest_SRCS
}
)
add_test
(
NAME exportaddressbookjobinterfacetest COMMAND exportaddressbookjobinterfacetest
)
ecm_mark_as_test
(
exportaddressbookjobinterfacetest
)
target_link_libraries
(
exportaddressbookjobinterfacetest Qt5::Test pimdataexporterprivate KF5::ConfigCore
)
target_link_libraries
(
exportaddressbookjobinterfacetest Qt5::Test pimdataexporterprivate KF5::ConfigCore
test_resourceconverter
)
core/autotests/addressbook/data/test1/list.txt
0 → 100644
View file @
f0b5bc58
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
core/autotests/addressbook/exportaddressbookjobinterfacetest.cpp
View file @
f0b5bc58
...
...
@@ -19,7 +19,8 @@
#include
"exportaddressbookjobinterfacetest.h"
#include
"archivestorage.h"
#include
"../resourceconvertertest.h"
#include
"compareexportfile.h"
#include
"resourceconvertertest.h"
#include
<QDebug>
#include
<QTest>
#include
<QSignalSpy>
...
...
@@ -66,7 +67,8 @@ void ExportAddressbookJobInterfaceTest::exportAddressBookConfigTest1()
qputenv
(
"XDG_CONFIG_HOME"
,
PIMDATAEXPORTER_DIR
"/test1/config"
);
//TODO fix file name.
const
QString
storeArchivePath
(
QStringLiteral
(
"/tmp/foo.zip"
));
const
QString
temporaryFile
=
QStringLiteral
(
"/tmp/foo.zip"
);
const
QString
storeArchivePath
(
temporaryFile
);
ArchiveStorage
*
archiveStorage
=
new
ArchiveStorage
(
storeArchivePath
,
this
);
Q_ASSERT
(
archiveStorage
->
openArchive
(
true
));
Utils
::
addVersion
(
archiveStorage
->
archive
());
...
...
@@ -80,6 +82,10 @@ void ExportAddressbookJobInterfaceTest::exportAddressBookConfigTest1()
QCOMPARE
(
error
.
count
(),
0
);
delete
exportNote
;
delete
archiveStorage
;
CompareExportFile
compareExportFile
;
compareExportFile
.
setTempFilePath
(
temporaryFile
);
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/test1/list.txt"
));
compareExportFile
.
compareFiles
();
}
...
...
core/autotests/akregator/data/test1/list.txt
0 → 100644
View file @
f0b5bc58
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
core/autotests/akregator/exportakregatorjobinterfacetest.cpp
View file @
f0b5bc58
...
...
@@ -19,7 +19,8 @@
#include
"exportakregatorjobinterfacetest.h"
#include
"archivestorage.h"
#include
"../resourceconvertertest.h"
#include
"resourceconvertertest.h"
#include
"compareexportfile.h"
#include
<QDebug>
#include
<QTest>
#include
<QSignalSpy>
...
...
@@ -49,7 +50,8 @@ void ExportAkregatorJobInterfaceTest::exportAkregatorConfigTest1()
qputenv
(
"XDG_CONFIG_HOME"
,
PIMDATAEXPORTER_DIR
"/test1/config"
);
//TODO fix file name.
const
QString
storeArchivePath
(
QStringLiteral
(
"/tmp/foo.zip"
));
const
QString
temporaryFile
=
QStringLiteral
(
"/tmp/foo.zip"
);
const
QString
storeArchivePath
(
temporaryFile
);
ArchiveStorage
*
archiveStorage
=
new
ArchiveStorage
(
storeArchivePath
,
this
);
Q_ASSERT
(
archiveStorage
->
openArchive
(
true
));
Utils
::
addVersion
(
archiveStorage
->
archive
());
...
...
@@ -63,6 +65,11 @@ void ExportAkregatorJobInterfaceTest::exportAkregatorConfigTest1()
QCOMPARE
(
error
.
count
(),
0
);
delete
exportNote
;
delete
archiveStorage
;
CompareExportFile
compareExportFile
;
compareExportFile
.
setTempFilePath
(
temporaryFile
);
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/test1/list.txt"
));
compareExportFile
.
compareFiles
();
}
...
...
core/autotests/alarm/data/test1/list.txt
0 → 100644
View file @
f0b5bc58
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
core/autotests/alarm/exportalarmjobinterfacetest.cpp
View file @
f0b5bc58
...
...
@@ -19,7 +19,8 @@
#include
"exportalarmjobinterfacetest.h"
#include
"archivestorage.h"
#include
"../resourceconvertertest.h"
#include
"compareexportfile.h"
#include
"resourceconvertertest.h"
#include
<QDebug>
#include
<QTest>
#include
<QSignalSpy>
...
...
@@ -54,7 +55,8 @@ void ExportAlarmJobInterfaceTest::exportAlarmConfigTest1()
qputenv
(
"XDG_CONFIG_HOME"
,
PIMDATAEXPORTER_DIR
"/test1/config"
);
//TODO fix file name.
const
QString
storeArchivePath
(
QStringLiteral
(
"/tmp/foo.zip"
));
const
QString
temporaryFile
=
QStringLiteral
(
"/tmp/foo.zip"
);
const
QString
storeArchivePath
(
temporaryFile
);
ArchiveStorage
*
archiveStorage
=
new
ArchiveStorage
(
storeArchivePath
,
this
);
Q_ASSERT
(
archiveStorage
->
openArchive
(
true
));
Utils
::
addVersion
(
archiveStorage
->
archive
());
...
...
@@ -68,6 +70,11 @@ void ExportAlarmJobInterfaceTest::exportAlarmConfigTest1()
QCOMPARE
(
error
.
count
(),
0
);
delete
exportNote
;
delete
archiveStorage
;
CompareExportFile
compareExportFile
;
compareExportFile
.
setTempFilePath
(
temporaryFile
);
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/test1/list.txt"
));
compareExportFile
.
compareFiles
();
}
...
...
core/autotests/calendar/data/test1/list.txt
0 → 100644
View file @
f0b5bc58
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
core/autotests/calendar/exportcalendarsjobinterfacetest.cpp
View file @
f0b5bc58
...
...
@@ -19,7 +19,8 @@
#include
"exportcalendarsjobinterfacetest.h"
#include
"archivestorage.h"
#include
"../resourceconvertertest.h"
#include
"compareexportfile.h"
#include
"resourceconvertertest.h"
#include
<QDebug>
#include
<QTest>
#include
<QSignalSpy>
...
...
@@ -54,7 +55,8 @@ void ExportCalendarsJobInterfaceTest::exportCalendarConfigTest1()
qputenv
(
"XDG_CONFIG_HOME"
,
PIMDATAEXPORTER_DIR
"/test1/config"
);
//TODO fix file name.
const
QString
storeArchivePath
(
QStringLiteral
(
"/tmp/foo.zip"
));
const
QString
temporaryFile
=
QStringLiteral
(
"/tmp/foo.zip"
);
const
QString
storeArchivePath
(
temporaryFile
);
ArchiveStorage
*
archiveStorage
=
new
ArchiveStorage
(
storeArchivePath
,
this
);
Q_ASSERT
(
archiveStorage
->
openArchive
(
true
));
Utils
::
addVersion
(
archiveStorage
->
archive
());
...
...
@@ -68,6 +70,11 @@ void ExportCalendarsJobInterfaceTest::exportCalendarConfigTest1()
QCOMPARE
(
error
.
count
(),
0
);
delete
exportNote
;
delete
archiveStorage
;
CompareExportFile
compareExportFile
;
compareExportFile
.
setTempFilePath
(
temporaryFile
);
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/test1/list.txt"
));
compareExportFile
.
compareFiles
();
}
core/autotests/mail/data/test1/list.txt
0 → 100644
View file @
f0b5bc58
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
core/autotests/mail/exportmailjobinterfacetest.cpp
View file @
f0b5bc58
...
...
@@ -19,7 +19,8 @@
#include
"exportmailjobinterfacetest.h"
#include
"archivestorage.h"
#include
"../resourceconvertertest.h"
#include
"resourceconvertertest.h"
#include
"compareexportfile.h"
#include
<QDebug>
#include
<QTest>
#include
<QSignalSpy>
...
...
@@ -77,7 +78,8 @@ void ExportMailJobInterfaceTest::exportMailConfigTest1()
qputenv
(
"XDG_CONFIG_HOME"
,
PIMDATAEXPORTER_DIR
"/test1/config"
);
//TODO fix file name.
const
QString
storeArchivePath
(
QStringLiteral
(
"/tmp/foo.zip"
));
const
QString
temporaryFile
=
QStringLiteral
(
"/tmp/foo.zip"
);
const
QString
storeArchivePath
(
temporaryFile
);
ArchiveStorage
*
archiveStorage
=
new
ArchiveStorage
(
storeArchivePath
,
this
);
Q_ASSERT
(
archiveStorage
->
openArchive
(
true
));
Utils
::
addVersion
(
archiveStorage
->
archive
());
...
...
@@ -91,4 +93,9 @@ void ExportMailJobInterfaceTest::exportMailConfigTest1()
QCOMPARE
(
error
.
count
(),
0
);
delete
exportNote
;
delete
archiveStorage
;
CompareExportFile
compareExportFile
;
compareExportFile
.
setTempFilePath
(
temporaryFile
);
compareExportFile
.
setListFilePath
(
QStringLiteral
(
PIMDATAEXPORTER_DIR
"/test1/list.txt"
));
compareExportFile
.
compareFiles
();
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment