diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2015-09-27 01:22:42 +0200 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@edeltech.ch> | 2016-08-28 15:18:55 +0000 |
commit | e52fcb7dc78c83586c813f55f087a98bae4eaa0e (patch) | |
tree | b397eb7566d464b28275e52d03f36be4e6646dcb /tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp | |
parent | 2743cd54a0785b6c8d16b570643281ef61024936 (diff) |
QTextDocument: fix string backward search
[ChangeLog][QtGui][QTextDocument] Fixed a bug that would return a wrong
position when searching backward from the end of the document.
Task-number: QTBUG-48182
Change-Id: I6e88f808a50cb840f61e7bc579e2a28c5300089d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp')
-rw-r--r-- | tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp index 02e2bf27e2..bb20d99e30 100644 --- a/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp @@ -323,6 +323,8 @@ void tst_QTextDocument::find_data() << 15 << 6 << 11; QTest::newRow("nbsp") << "Hello" + QString(QChar(QChar::Nbsp)) +"World" << " " << int(QTextDocument::FindCaseSensitively) << 0 << 5 << 6; + + QTest::newRow("from-the-end") << "Hello World" << "Hello World" << int(QTextDocument::FindCaseSensitively| QTextDocument::FindBackward) << 11 << 0 << 11; } void tst_QTextDocument::find() |