summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp')
-rw-r--r--tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index b811c63036..e0a261efd0 100644
--- a/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/text/qstringbuilder/qstringbuilder1/stringbuilder.cpp
@@ -344,6 +344,14 @@ void runScenario()
QByteArray ba2 = withZero;
ba2 += ba2 P withZero;
QCOMPARE(ba2, QByteArray(withZero + withZero + withZero));
+
+ // With space allocated in front, mirroring what happens with QHttpMultiPart in QNAM
+ QByteArray byteArray;
+ byteArray.reserve(70);
+ byteArray.insert(0, "multipart/");
+ byteArray.insert(byteArray.size(), "mixed");
+ byteArray += "; boundary=\"" P QByteArray(30, 'o') P '"';
+ QCOMPARE(byteArray, "multipart/mixed; boundary=\"oooooooooooooooooooooooooooooo\"");
}
}