summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-07 13:08:25 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-07 13:08:26 +0200
commita9db7290956f5674992233d792e6dfd312ec1e53 (patch)
treea082a94d64b5a8568143f34a0f00db374e188022 /tests
parentd1a22bd29856807805fa56608d2953c072df0cf1 (diff)
parentabfb1b8665923ce2824392f3a04e5e4ac3871017 (diff)
Merge remote-tracking branch 'origin/5.12.5' into 5.12
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
index 9c477589f9..f0a32c2ed4 100644
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
@@ -138,6 +138,7 @@ private slots:
void noModificationOfInputString();
void superscriptCrash_qtbug53911();
void showLineAndParagraphSeparatorsCrash();
+ void tooManyDirectionalCharctersCrash_qtbug77819();
private:
QFont testFont;
@@ -2309,5 +2310,21 @@ void tst_QTextLayout::nbspWithFormat()
QCOMPARE(layout.lineAt(1).textLength(), s2.length() + 1 + s3.length());
}
+void tst_QTextLayout::tooManyDirectionalCharctersCrash_qtbug77819()
+{
+ QString data;
+ data += QString::fromUtf8("\xe2\x81\xa8"); // U+2068 FSI character
+ data += QString::fromUtf8("\xe2\x81\xa7"); // U+2067 RLI character
+
+ // duplicating the text
+ for (int i = 0; i < 10; i++)
+ data += data;
+
+ // Nothing to test. It must not crash in beginLayout().
+ QTextLayout tl(data);
+ tl.beginLayout();
+ tl.endLayout();
+}
+
QTEST_MAIN(tst_QTextLayout)
#include "tst_qtextlayout.moc"