diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-20 12:59:07 +0000 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2010-08-20 12:59:07 +0000 |
| commit | 31f92915ef254bbdb702e1de0de72bdeff831ab6 (patch) | |
| tree | c4385d1ec96815ba06927626ce8407f523675b0d /tests/tests.cpp | |
| parent | d5b9ca273924e220a6b5a9c78e7fddfe9400ac53 (diff) | |
| download | qxmpp-31f92915ef254bbdb702e1de0de72bdeff831ab6.tar.gz | |
implement and test quoted character handling
Diffstat (limited to 'tests/tests.cpp')
| -rw-r--r-- | tests/tests.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/tests.cpp b/tests/tests.cpp index 981c3abf..91cf510e 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -56,12 +56,13 @@ void TestUtils::testDigestMd5() QCOMPARE(serializeDigestMd5(empty), QByteArray()); // non-empty - const QByteArray bytes("number=12345,quoted=\"quoted string\",string=string"); + const QByteArray bytes("number=12345,quoted_plain=\"quoted string\",quoted_quote=\"quoted\\\\slash\\\"quote\",string=string"); QMap<QByteArray, QByteArray> map = parseDigestMd5(bytes); - QCOMPARE(map.size(), 3); + QCOMPARE(map.size(), 4); QCOMPARE(map["number"], QByteArray("12345")); - QCOMPARE(map["quoted"], QByteArray("quoted string")); + QCOMPARE(map["quoted_plain"], QByteArray("quoted string")); + QCOMPARE(map["quoted_quote"], QByteArray("quoted\\slash\"quote")); QCOMPARE(map["string"], QByteArray("string")); QCOMPARE(serializeDigestMd5(map), bytes); } |
