summaryrefslogtreecommitdiffstats
path: root/tests/auto/qurl
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-10-29 13:55:59 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-10-29 13:55:59 (GMT)
commitcfd4156e0dd3f42e23596bba40a30f93f7cdd64b (patch)
treec32b7accd6fad4dba03b31581dcba551f9002831 /tests/auto/qurl
parent22e4b3dfa9f8ee6a596ac6e0d02cb39f364ef27d (diff)
downloadQt-cfd4156e0dd3f42e23596bba40a30f93f7cdd64b.zip
Qt-cfd4156e0dd3f42e23596bba40a30f93f7cdd64b.tar.gz
Qt-cfd4156e0dd3f42e23596bba40a30f93f7cdd64b.tar.bz2
Autotest: add a few more tests for Unicode (IDN) support
Diffstat (limited to 'tests/auto/qurl')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 87018d3..c8fe4e5 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -3694,7 +3694,6 @@ void tst_QUrl::fromUserInput_data()
// File
QDirIterator it(QDir::homePath());
- QString fileString;
int c = 0;
while (it.hasNext()) {
it.next();
@@ -3703,8 +3702,12 @@ void tst_QUrl::fromUserInput_data()
// basic latin1
QTest::newRow("unicode-0") << QString::fromUtf8("\xc3\xa5.com/") << QUrl::fromEncoded(QString::fromUtf8("http://\xc3\xa5.com/").toUtf8(), QUrl::TolerantMode);
+ QTest::newRow("unicode-0b") << QString::fromUtf8("\xc3\xa5.com/") << QUrl::fromEncoded("http://%C3%A5.com/", QUrl::TolerantMode);
+ QTest::newRow("unicode-0c") << QString::fromUtf8("\xc3\xa5.com/") << QUrl::fromEncoded("http://xn--5ca.com/", QUrl::TolerantMode);
// unicode
QTest::newRow("unicode-1") << QString::fromUtf8("\xce\xbb.com/") << QUrl::fromEncoded(QString::fromUtf8("http://\xce\xbb.com/").toUtf8(), QUrl::TolerantMode);
+ QTest::newRow("unicode-1b") << QString::fromUtf8("\xce\xbb.com/") << QUrl::fromEncoded("http://%CE%BB.com/", QUrl::TolerantMode);
+ QTest::newRow("unicode-1c") << QString::fromUtf8("\xce\xbb.com/") << QUrl::fromEncoded("http://xn--wxa.com/", QUrl::TolerantMode);
// no scheme
QTest::newRow("add scheme-0") << "example.org" << QUrl("http://example.org");
@@ -3713,7 +3716,7 @@ void tst_QUrl::fromUserInput_data()
QTest::newRow("add scheme-3") << "webkit" << QUrl("webkit");
// QUrl's tolerant parser should already handle this
- QTest::newRow("not-encoded-0") << "http://example.org/test page.html" << QUrl("http://example.org/test%20page.html");
+ QTest::newRow("not-encoded-0") << "http://example.org/test page.html" << QUrl::fromEncoded("http://example.org/test%20page.html");
// Make sure the :80, i.e. port doesn't screw anything up
QUrl portUrl("http://example.org");