From 6f3bb0aafab877c34dea3d9141a9931b5a7914a5 Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 15 Jul 2014 15:25:23 +0200 Subject: tst_qurl: add tests for mailto parsing and toString. No bug. This was prompted by https://git.reviewboard.kde.org/r/119221 Change-Id: Ia148f07f6d711df533693918bbedfa5e7dc02cd5 Reviewed-by: Thiago Macieira --- tests/auto/corelib/io/qurl/tst_qurl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto/corelib') diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 92dbb96817..d5eab54363 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -1027,6 +1027,13 @@ void tst_QUrl::toString_data() QTest::newRow("underscore") << QString::fromLatin1("http://foo_bar.host.com/rss.php") << uint(QUrl::None) << QString::fromLatin1("http://foo_bar.host.com/rss.php"); + + QTest::newRow("mailto-brackets") << QString::fromLatin1("mailto:test[at]gmail[dot]com") + << uint(QUrl::PrettyDecoded) + << QString::fromLatin1("mailto:test[at]gmail[dot]com"); + QTest::newRow("mailto-query") << QString::fromLatin1("mailto:?to=test@example.com") + << uint(QUrl::PrettyDecoded) + << QString::fromLatin1("mailto:?to=test@example.com"); } void tst_QUrl::toString() -- cgit v1.2.3