diff --git a/tests/auto/corelib/text/qtextboundaryfinder/BLACKLIST b/tests/auto/corelib/text/qtextboundaryfinder/BLACKLIST deleted file mode 100644 index d7014e931bd..00000000000 --- a/tests/auto/corelib/text/qtextboundaryfinder/BLACKLIST +++ /dev/null @@ -1,7 +0,0 @@ -# QTBUG-121529: Tests need to be updated to Unicode 15.1 -[lineBoundariesDefault] -* - -# QTBUG-121529: Tests need to be updated to Unicode 15.1 -[graphemeBoundariesDefault] -* diff --git a/tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp index 321d6dd8027..cf9eabdf0fc 100644 --- a/tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp +++ b/tests/auto/corelib/text/qtextboundaryfinder/tst_qtextboundaryfinder.cpp @@ -8,9 +8,12 @@ #include #include #include +#include #include +using namespace Qt::Literals::StringLiterals; + class tst_QTextBoundaryFinder : public QObject { Q_OBJECT @@ -71,7 +74,7 @@ inline char *toString(const QList &list) QT_END_NAMESPACE #ifdef QT_BUILD_INTERNAL -static void generateDataFromFile(const QString &fname) +static void generateDataFromFile(const QString &fname, const QSet &skipSet = {}) { QTest::addColumn("testString"); QTest::addColumn >("expectedBreakPositions"); @@ -123,6 +126,8 @@ static void generateDataFromFile(const QString &fname) QVERIFY(!testString.isEmpty()); QVERIFY(!expectedBreakPositions.isEmpty()); + bool skip = false; + if (!comments.isEmpty()) { const QStringList lst = comments.simplified().split(QLatin1Char(' '), Qt::SkipEmptyParts); comments.clear(); @@ -134,13 +139,19 @@ static void generateDataFromFile(const QString &fname) comments += QLatin1Char('x'); continue; } - if (part.startsWith(QLatin1Char('(')) && part.endsWith(QLatin1Char(')'))) + if (part.startsWith(QLatin1Char('(')) && part.endsWith(QLatin1Char(')'))) { + skip |= skipSet.contains(part.sliced(1, part.length() - 2)); comments += part; + } } } const QByteArray nm = "line #" + QByteArray::number(linenum) + ": " + comments.toLatin1(); - QTest::newRow(nm.constData()) << testString << expectedBreakPositions; + + if (skip) + qDebug() << "Skipping" << nm; + else + QTest::newRow(nm.constData()) << testString << expectedBreakPositions; } } #endif @@ -200,7 +211,10 @@ QT_END_NAMESPACE void tst_QTextBoundaryFinder::graphemeBoundariesDefault_data() { - generateDataFromFile("data/GraphemeBreakTest.txt"); + + // QTBUG-121907: We are not using Unicode grapheme segmentation for Indic scripts. + QSet skipSet = {u"ConjunctLinkingScripts_LinkingConsonant"_s}; + generateDataFromFile("data/GraphemeBreakTest.txt", skipSet); } void tst_QTextBoundaryFinder::graphemeBoundariesDefault() @@ -248,7 +262,10 @@ void tst_QTextBoundaryFinder::sentenceBoundariesDefault() void tst_QTextBoundaryFinder::lineBoundariesDefault_data() { - generateDataFromFile("data/LineBreakTest.txt"); + // QTBUG-121907: Indic line breaking is not supported + QSet skipSet = {u"AK"_s, u"AP"_s, u"AS"_s, u"VI"_s, u"VF"_s}; + + generateDataFromFile("data/LineBreakTest.txt", skipSet); } void tst_QTextBoundaryFinder::lineBoundariesDefault()