Commit 017ef2fc authored by Volker Krause's avatar Volker Krause
Browse files

Adapt test reference data to KPkPass changes

Also improve the diagnostic output of this test.
parent cbceb9d3
Pipeline #165235 passed with stages
in 2 minutes and 24 seconds
......@@ -16,6 +16,7 @@
#include <QDebug>
#include <QFile>
#include <QJsonDocument>
#include <QProcess>
#include <QTest>
using namespace KItinerary;
......@@ -90,7 +91,15 @@ private Q_SLOTS:
const auto refResult = QJsonDocument::fromJson(ref.readAll()).array();
if (result != refResult) {
qDebug().noquote() << QJsonDocument(result).toJson();
QFile failFile(refFile + QLatin1String(".fail"));
QVERIFY(failFile.open(QFile::WriteOnly));
failFile.write(QJsonDocument(result).toJson());
failFile.close();
QProcess proc;
proc.setProcessChannelMode(QProcess::ForwardedChannels);
proc.start(QStringLiteral("diff"), {QStringLiteral("-u"), refFile, failFile.fileName()});
QVERIFY(proc.waitForFinished());
}
QCOMPARE(result, refResult);
}
......
......@@ -148,6 +148,12 @@
},
"foregroundColor": "#000000",
"groupingIdentifier": "",
"hasBackground": false,
"hasFooter": false,
"hasIcon": false,
"hasLogo": false,
"hasStrip": false,
"hasThumbnail": false,
"headerFields": [
{
"changeMessage": "seatchangeMessage",
......@@ -436,6 +442,12 @@
},
"foregroundColor": "#000000",
"groupingIdentifier": "",
"hasBackground": false,
"hasFooter": false,
"hasIcon": false,
"hasLogo": false,
"hasStrip": false,
"hasThumbnail": false,
"headerFields": [
{
"changeMessage": "seatchangeMessage",
......
Supports Markdown
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