Commit 875a0e7f authored by Laurent Montel's avatar Laurent Montel 😁

Merge remote-tracking branch 'origin/release/20.12'

parents 9d6669e8 6fc492e1
Pipeline #44059 canceled with stage
......@@ -18,5 +18,27 @@ ImportKMailAutocorrectionTest::ImportKMailAutocorrectionTest(QObject *parent)
void ImportKMailAutocorrectionTest::shouldHaveDefaultValues()
{
PimCommon::ImportKMailAutocorrection import;
//TODO
QVERIFY(import.upperCaseExceptions().isEmpty());
QVERIFY(import.twoUpperLetterExceptions().isEmpty());
QVERIFY(import.autocorrectEntries().isEmpty());
QVERIFY(import.superScriptEntries().isEmpty());
QCOMPARE(import.typographicSingleQuotes().begin, QChar());
QCOMPARE(import.typographicSingleQuotes().end, QChar());
QCOMPARE(import.typographicDoubleQuotes().begin, QChar());
QCOMPARE(import.typographicDoubleQuotes().end, QChar());
QCOMPARE(import.maxFindStringLenght(), 0);
QCOMPARE(import.minFindStringLenght(), 0);
}
void ImportKMailAutocorrectionTest::shouldLoadFile()
{
const QString originalFile = QLatin1String(AUTOCORRECTION_DATA_DIR) + QStringLiteral("/custom-fr.xml");
PimCommon::ImportKMailAutocorrection import;
QVERIFY(import.import(originalFile));
QCOMPARE(import.typographicSingleQuotes().begin, QStringLiteral("‘"));
QCOMPARE(import.typographicSingleQuotes().end, QStringLiteral("’"));
QCOMPARE(import.typographicDoubleQuotes().begin, QStringLiteral("“"));
QCOMPARE(import.typographicDoubleQuotes().end, QStringLiteral("”"));
}
......@@ -16,6 +16,7 @@ public:
~ImportKMailAutocorrectionTest() override = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
void shouldLoadFile();
};
#endif // IMPORTKMAILAUTOCORRECTIONTEST_H
......@@ -12,9 +12,9 @@
#include <QHash>
#include "autocorrection/autocorrection.h"
#include "pimcommon_private_export.h"
namespace PimCommon {
class ImportAbstractAutocorrection
class PIMCOMMON_TESTS_EXPORT ImportAbstractAutocorrection
{
Q_GADGET
public:
......
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