Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
83658540
Commit
83658540
authored
Mar 21, 2021
by
Volker Krause
Browse files
Also make this test work without ZXing
Should fix all remaining issues on the CI.
parent
0a2aca98
Pipeline
#55136
canceled with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autotests/extractorscriptenginetest.cpp
View file @
83658540
...
...
@@ -4,6 +4,8 @@
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "config-kitinerary.h"
#include <KItinerary/ExtractorDocumentNode>
#include <KItinerary/ExtractorDocumentNodeFactory>
#include <KItinerary/ExtractorDocumentProcessor>
...
...
@@ -55,7 +57,12 @@ private Q_SLOTS:
QTest
::
newRow
(
"text/plain"
)
<<
s
(
SOURCE_DIR
"/scriptenginedata/plain-text.txt"
)
<<
s
(
SOURCE_DIR
"/scriptenginedata/plain-text.txt.json"
);
QTest
::
newRow
(
"pkpass"
)
<<
s
(
SOURCE_DIR
"/pkpassdata/swiss.pkpass"
)
<<
s
(
SOURCE_DIR
"/scriptenginedata/swiss.pkpass.json"
);
QTest
::
newRow
(
"IATA BCBP PDF"
)
<<
s
(
SOURCE_DIR
"/extractordata/synthetic/iata-bcbp-demo.pdf"
)
<<
s
(
SOURCE_DIR
"/scriptenginedata/iata-bcbp-demo.pdf.json"
);
QTest
::
newRow
(
"IATA BCBP PDF"
)
<<
s
(
SOURCE_DIR
"/extractordata/synthetic/iata-bcbp-demo.pdf"
)
#ifdef HAVE_ZXING
<<
s
(
SOURCE_DIR
"/scriptenginedata/iata-bcbp-demo.pdf.json"
);
#else
<<
s
(
SOURCE_DIR
"/scriptenginedata/iata-bcbp-demo.pdf-no-zxing.json"
);
#endif
QTest
::
newRow
(
"ical"
)
<<
s
(
SOURCE_DIR
"/extractordata/ical/eventreservation.ics"
)
<<
s
(
SOURCE_DIR
"/scriptenginedata/eventreservation.ics.json"
);
QTest
::
newRow
(
"uic9183"
)
<<
s
(
SOURCE_DIR
"/uic918-3/valid/Testw_VOW8XG6_A9E8DXL_0.bin"
)
<<
s
(
SOURCE_DIR
"/scriptenginedata/Testw_VOW8XG6_A9E8DXL_0.bin.json"
);
QTest
::
newRow
(
"html"
)
<<
s
(
SOURCE_DIR
"/structureddata/google-flight-reservation-json-ld.html"
)
<<
s
(
SOURCE_DIR
"/scriptenginedata/google-flight-reservation-json-ld.html.json"
);
...
...
@@ -63,6 +70,7 @@ private Q_SLOTS:
void
testArguments
()
{
QFETCH
(
QString
,
inputFile
);
QFETCH
(
QString
,
refFile
);
...
...
autotests/scriptenginedata/iata-bcbp-demo.pdf-no-zxing.json
0 → 100644
View file @
83658540
⎄
[
{
"content"
:
{
"creationTime"
:
"Mon Aug 19 20:23:28 2019 GMT+0200"
,
"modificationTime"
:
"Invalid Date"
,
"objectName"
:
""
,
"pageCount"
:
1
,
"pages"
:
[
{
"images"
:
[
{
"height"
:
139
,
"width"
:
139
},
{
"height"
:
79
,
"width"
:
79
}
],
"text"
:
" Akademy Airways
\n
Boarding Pass
\n
From: Vienna International, Terminal 2
\n
To: Milano Malpensa, Terminal 1
\n
Flight: AK 1996
\n
Gate: A36
\n
Boarding Time: 15:20
\n
Departure Time: 15:45
\n
Arrival Time: 17:20
\n
Passenger: Dragon, Dr. Konqi
\n
"
}
],
"text"
:
" Akademy Airways
\n
Boarding Pass
\n
From: Vienna International, Terminal 2
\n
To: Milano Malpensa, Terminal 1
\n
Flight: AK 1996
\n
Gate: A36
\n
Boarding Time: 15:20
\n
Departure Time: 15:45
\n
Arrival Time: 17:20
\n
Passenger: Dragon, Dr. Konqi
\n
"
}
},
{
"childNodes"
:
[
{
"childNodes"
:
[
],
"content"
:
"QVariant(QImage, QImage(QSize(164, 164),format=QImage::Format_Grayscale8,depth=8,devicePixelRatio=1,bytesPerLine=164,sizeInBytes=26896))"
,
"contextDateTime"
:
"Mon Aug 19 20:23:28 2019 GMT+0200"
,
"isNull"
:
false
,
"location"
:
0
,
"mimeType"
:
"internal/qimage"
,
"result"
:
[
]
}
],
"content"
:
{
"creationTime"
:
"Mon Aug 19 20:23:28 2019 GMT+0200"
,
"modificationTime"
:
"Invalid Date"
,
"objectName"
:
""
,
"pageCount"
:
1
,
"pages"
:
[
{
"images"
:
[
{
"height"
:
139
,
"width"
:
139
},
{
"height"
:
79
,
"width"
:
79
}
],
"text"
:
" Akademy Airways
\n
Boarding Pass
\n
From: Vienna International, Terminal 2
\n
To: Milano Malpensa, Terminal 1
\n
Flight: AK 1996
\n
Gate: A36
\n
Boarding Time: 15:20
\n
Departure Time: 15:45
\n
Arrival Time: 17:20
\n
Passenger: Dragon, Dr. Konqi
\n
"
}
],
"text"
:
" Akademy Airways
\n
Boarding Pass
\n
From: Vienna International, Terminal 2
\n
To: Milano Malpensa, Terminal 1
\n
Flight: AK 1996
\n
Gate: A36
\n
Boarding Time: 15:20
\n
Departure Time: 15:45
\n
Arrival Time: 17:20
\n
Passenger: Dragon, Dr. Konqi
\n
"
},
"contextDateTime"
:
"Mon Aug 19 20:23:28 2019 GMT+0200"
,
"isNull"
:
false
,
"mimeType"
:
"application/pdf"
,
"result"
:
[
]
},
{
"data"
:
[
],
"objectName"
:
""
,
"pdfPageNumber"
:
0
,
"senderDate"
:
"Mon Aug 19 20:23:28 2019 GMT+0200"
}
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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