From 79f2a9e666a241c5baba1b9bf35c12be4cefcc26 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 25 Jan 2019 10:17:18 +0100 Subject: Fix an assertion in the BiDi algorithm The algorithm has been treating DirB inconsistently so far. initScriptAnalysisAndIsolatePairs was treating it differently than generateDireationalRuns leading to assertions. It wasn't visible in our test data, as DirB is in almost all cases the paragraph separator, where we split strings anyway. Change-Id: I7dc0e7bbcf30ee84d8781ea06097da023e371f05 Fixes: QTBUG-73238 Reviewed-by: Robert Loehning Reviewed-by: Eskil Abrahamsen Blomfeldt --- tests/auto/other/qcomplextext/tst_qcomplextext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto/other/qcomplextext') diff --git a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp index 0116e546a0..c328776089 100644 --- a/tests/auto/other/qcomplextext/tst_qcomplextext.cpp +++ b/tests/auto/other/qcomplextext/tst_qcomplextext.cpp @@ -68,6 +68,12 @@ void tst_QComplexText::bidiReorderString_data() << (int) data->basicDir; data++; } + + QString isolateAndBoundary = QString(QChar(0x2068 /* DirFSI */)) + QChar(0x1c /* DirB */) + QChar(0x2069 /* DirPDI */); + QTest::newRow( "isolateAndBoundary" ) + << QString::fromUtf8( data->logical ) + << QString::fromUtf8( data->visual ) + << (int) QChar::DirL; } void tst_QComplexText::bidiReorderString() -- cgit v1.2.3