diff options
Diffstat (limited to 'tests/auto/qtextlayout/tst_qtextlayout.cpp')
-rw-r--r-- | tests/auto/qtextlayout/tst_qtextlayout.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index fe87dfb..7c3f4f2 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -118,6 +118,7 @@ private slots: void smallTextLengthWordWrap(); void smallTextLengthWrapAtWordBoundaryOrAnywhere(); void testLineBreakingAllSpaces(); + void lineWidthFromBOM(); private: @@ -1306,6 +1307,18 @@ void tst_QTextLayout::columnWrapWithTabs() } +void tst_QTextLayout::lineWidthFromBOM() +{ + const QString string(QChar(0xfeff)); // BYTE ORDER MARK + QTextLayout layout(string); + layout.beginLayout(); + QTextLine line = layout.createLine(); + line.setLineWidth(INT_MAX / 256); + layout.endLayout(); + + // Don't spin into an infinite loop + } + QTEST_MAIN(tst_QTextLayout) #include "tst_qtextlayout.moc" |