summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-04-26 13:16:34 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-04-28 11:34:05 (GMT)
commita8065da96b96fcc4baeca7615c2a4195c05cbc03 (patch)
tree0bfbe0d5d37177bcb7c2ed6e1432a480d81168a2 /tests
parent18480fd6cec52722d9d096991790e32837a7ebd8 (diff)
downloadQt-a8065da96b96fcc4baeca7615c2a4195c05cbc03.zip
Qt-a8065da96b96fcc4baeca7615c2a4195c05cbc03.tar.gz
Qt-a8065da96b96fcc4baeca7615c2a4195c05cbc03.tar.bz2
QUrl: parsing of host name with an undercore.
This is not supposed to be allowed, but it work with other browsers Rask-number: QTBUG-7434 Reviewed-by: Thiago Reviewed-by: Markus Goetz
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qurl/tst_qurl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp
index b7cbdb8..fa42adc 100644
--- a/tests/auto/qurl/tst_qurl.cpp
+++ b/tests/auto/qurl/tst_qurl.cpp
@@ -1632,6 +1632,10 @@ void tst_QUrl::toString_data()
QTest::newRow("nopath_task31320") << QString::fromLatin1("host://protocol")
<< uint(QUrl::None)
<< QString::fromLatin1("host://protocol");
+
+ QTest::newRow("underscore_QTBUG-7434") << QString::fromLatin1("http://foo_bar.host.com/rss.php")
+ << uint(QUrl::None)
+ << QString::fromLatin1("http://foo_bar.host.com/rss.php");
}
void tst_QUrl::toString()
@@ -3244,7 +3248,6 @@ void tst_QUrl::std3violations_data()
QTest::newRow("question") << "foo?bar" << true;
QTest::newRow("at") << "foo@bar" << true;
QTest::newRow("backslash") << "foo\\bar" << false;
- QTest::newRow("underline") << "foo_bar" << false;
// these characters are transformed by NFKC to non-LDH characters
QTest::newRow("dot-like") << QString::fromUtf8("foo\342\200\244bar") << false; // U+2024 ONE DOT LEADER
@@ -3289,6 +3292,7 @@ void tst_QUrl::std3deviations_data()
QTest::newRow("ending-dot") << "example.com.";
QTest::newRow("ending-dot3002") << QString("example.com") + QChar(0x3002);
+ QTest::newRow("underline") << "foo_bar"; //QTBUG-7434
}
void tst_QUrl::std3deviations()