diff options
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/text/qstring/tst_qstring.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index 47470abd6f..e6d73c6ef1 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -2876,6 +2876,17 @@ void tst_QString::replace_string_extra() s.replace( QString("BBB"), smallReplacement ); QCOMPARE( s, smallReplacement ); } + + { + QString s(QLatin1String("BBB")); + QString expected(QLatin1String("BBB")); + for (int i = 0; i < 1028; ++i) { + s.append("X"); + expected.append("GXU"); + } + s.replace(QChar('X'), "GXU"); + QCOMPARE(s, expected); + } } void tst_QString::replace_regexp() |