Commit d7ce7f11 authored by Volker Krause's avatar Volker Krause
Browse files

Also run extraction tests on PNG files

Those work as well, and this way we can test direct barcode extraction.
parent e6019542
......@@ -60,7 +60,7 @@ private Q_SLOTS:
continue;
}
QDirIterator it(baseDir.path(), {QStringLiteral("*.txt"), QStringLiteral("*.html"), QStringLiteral("*.pdf"), QStringLiteral("*.pkpass"), QStringLiteral("*.ics"), QStringLiteral("*.eml"), QStringLiteral("*.mbox"), QStringLiteral("*.bin")}, QDir::Files | QDir::Readable | QDir::NoSymLinks, QDirIterator::Subdirectories);
QDirIterator it(baseDir.path(), {QStringLiteral("*.txt"), QStringLiteral("*.html"), QStringLiteral("*.pdf"), QStringLiteral("*.pkpass"), QStringLiteral("*.ics"), QStringLiteral("*.eml"), QStringLiteral("*.mbox"), QStringLiteral("*.bin"), QStringLiteral("*.png")}, QDir::Files | QDir::Readable | QDir::NoSymLinks, QDirIterator::Subdirectories);
while (it.hasNext()) {
it.next();
// ignore context files
......@@ -80,11 +80,10 @@ private Q_SLOTS:
{
QFETCH(QString, contextFile);
QFETCH(QString, inputFile);
if (contextFile.isEmpty()) {
return;
}
m_engine.clear();
m_engine.setHints(inputFile.endsWith(QLatin1String(".png")) ? ExtractorEngine::ExtractFullPageRasterImages : ExtractorEngine::NoHint);
QFile inFile(inputFile);
QVERIFY(inFile.open(QFile::ReadOnly));
......
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