summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-03-02 15:41:05 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-03-02 17:10:38 (GMT)
commit7fc63dd0ff368a637dcd17e692b9d6b26278b538 (patch)
treee4535c4ebb615b52e347a97158efe40247f23a16 /tests/auto
parent120905fbc48ac7658fac392113bf45e00880c456 (diff)
downloadQt-7fc63dd0ff368a637dcd17e692b9d6b26278b538.zip
Qt-7fc63dd0ff368a637dcd17e692b9d6b26278b538.tar.gz
Qt-7fc63dd0ff368a637dcd17e692b9d6b26278b538.tar.bz2
QString::section: Fix crash with SectionIncludeLeadingSep flag
And start is out of bounds. Reviewed-by: Thiago Reviewed-by: Joao Task-number: QTBUG-4306
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qstring/tst_qstring.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp
index c9b3436..4ebcade 100644
--- a/tests/auto/qstring/tst_qstring.cpp
+++ b/tests/auto/qstring/tst_qstring.cpp
@@ -3503,7 +3503,10 @@ void tst_QString::section_data()
<< QString("\\b") << 3 << 3
<< int(QString::SectionDefault)
<< QString("is") << true;
-
+ QTest::newRow( "task257941-rx" ) << QString("99.0 42.3")
+ << QString("\\s*[AaBb]\\s*") << 1 << 1
+ << int(QString::SectionIncludeLeadingSep)
+ << QString() << true;
}
void tst_QString::section()