summaryrefslogtreecommitdiffstats
path: root/tests/auto/qurl
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-05-08 16:36:26 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-05-08 21:48:14 (GMT)
commit75f0c1f0f0496ae22ed89b996dfb0050defd0f3e (patch)
treedcd8e9f5e83b6ae3d51ba821df0e36037b6256c1 /tests/auto/qurl
parent79533291672fd5e6ddafe5be90501cbe2ec97b1b (diff)
downloadQt-75f0c1f0f0496ae22ed89b996dfb0050defd0f3e.zip
Qt-75f0c1f0f0496ae22ed89b996dfb0050defd0f3e.tar.gz
Qt-75f0c1f0f0496ae22ed89b996dfb0050defd0f3e.tar.bz2
QUrl: fix parsing of IRIs with more than one IDN label
Task-number: QTBUG-10511 Reviewed-by: Trust Me
Diffstat (limited to 'tests/auto/qurl')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index 83109b5..8dffebb 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -3189,6 +3189,32 @@ void tst_QUrl::ace_testsuite_data()
QTest::newRow("separator-3002") << QString::fromUtf8("example\343\200\202com")
<< "example.com" << "." << "example.com";
+
+ QString egyptianIDN =
+ QString::fromUtf8("\331\210\330\262\330\247\330\261\330\251\055\330\247\331\204\330"
+ "\243\330\252\330\265\330\247\331\204\330\247\330\252.\331\205"
+ "\330\265\330\261");
+ QTest::newRow("egyptian-tld-ace")
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
+ QTest::newRow("egyptian-tld-unicode")
+ << egyptianIDN
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
+ QTest::newRow("egyptian-tld-mix1")
+ << QString::fromUtf8("\331\210\330\262\330\247\330\261\330\251\055\330\247\331\204\330"
+ "\243\330\252\330\265\330\247\331\204\330\247\330\252.xn--wgbh1c")
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
+ QTest::newRow("egyptian-tld-mix2")
+ << QString::fromUtf8("xn----rmckbbajlc6dj7bxne2c.\331\205\330\265\330\261")
+ << "xn----rmckbbajlc6dj7bxne2c.xn--wgbh1c"
+ << "."
+ << egyptianIDN;
}
void tst_QUrl::ace_testsuite()