Commit 7fba7b8e authored by Christian Schoenebeck's avatar Christian Schoenebeck Committed by Sandro Knauß
Browse files

Fix build error with VisualStudio < v16.2

Replace C++11 raw string literals by convential string literals in
conjunction with escape sequences, as those raw string literals
triggered build errors [1] with older VisualStudio versions due to
a MSVC compiler bug (already fixed [2] in VisualStudio v16.2).

[1] !7 (comment 525503)
[2] https://developercommunity.visualstudio.com/t/stringifying-raw-string-literal/67300
parent f05864ce
......@@ -100,14 +100,12 @@ void UtilTest::testFoldHeader()
QByteArray("To: \"Body, Some\" <some@where>, \"Doe, John\" <some@else>,\n \"Bbb, Aaaa\" <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb>"));
// ignore escaped double quote within quoted string
QCOMPARE(KMime::foldHeader(R"RAW(To: "\"Body, Some" <some@where>, "\"Doe, John" <some@else>, "\"Bbb, Aaaa" <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb>)RAW"),
QByteArray(R"RAW(To: "\"Body, Some" <some@where>, "\"Doe, John" <some@else>,
"\"Bbb, Aaaa" <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb>)RAW"));
QCOMPARE(KMime::foldHeader("To: \"\\\"Body, Some\" <some@where>, \"\\\"Doe, John\" <some@else>, \"\\\"Bbb, Aaaa\" <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb>"),
QByteArray("To: \"\\\"Body, Some\" <some@where>, \"\\\"Doe, John\" <some@else>,\n \"\\\"Bbb, Aaaa\" <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb>"));
// escaped backslashes, followed by escaped double quote within quoted string
QCOMPARE(KMime::foldHeader(R"RAW(To: "Body\\\\\", Some\\\\" <some@where>, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb)RAW"),
QByteArray(R"RAW(To: "Body\\\\\", Some\\\\" <some@where>,
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb)RAW"));
QCOMPARE(KMime::foldHeader("To: \"Body\\\\\\\\\\\", Some\\\\\\\\\" <some@where>, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb"),
QByteArray("To: \"Body\\\\\\\\\\\", Some\\\\\\\\\" <some@where>,\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@bbbbb"));
}
void UtilTest::testExtractHeader()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment