summaryrefslogtreecommitdiffstats
path: root/tests/auto/networkselftest
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-20 17:55:58 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-22 07:41:11 (GMT)
commitd60a1d03453ab08ac12f85b4cf3beb0d4902b406 (patch)
tree3bb0125b6074ad9f575c93fcbb82e23ae61303e1 /tests/auto/networkselftest
parent1692e4824a6c7b255b2f7d492ca69c4092d173ad (diff)
downloadQt-d60a1d03453ab08ac12f85b4cf3beb0d4902b406.zip
Qt-d60a1d03453ab08ac12f85b4cf3beb0d4902b406.tar.gz
Qt-d60a1d03453ab08ac12f85b4cf3beb0d4902b406.tar.bz2
[networkselftest] Add a test for the FTP proxy server
Diffstat (limited to 'tests/auto/networkselftest')
-rw-r--r--tests/auto/networkselftest/tst_networkselftest.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp
index d40a3fa..2cfe1cb 100644
--- a/tests/auto/networkselftest/tst_networkselftest.cpp
+++ b/tests/auto/networkselftest/tst_networkselftest.cpp
@@ -72,6 +72,7 @@ private slots:
// specific protocol tests
void ftpServer();
+ void ftpProxyServer();
void imapServer();
void httpServer();
void httpsServer();
@@ -458,11 +459,11 @@ void tst_NetworkSelfTest::fileLineEndingTest()
QVERIFY2(!lineEndingType.compare("LF"), QString("Reference file %1 has %2 as line ending - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit());
}
-static QList<Chat> ftpChat()
+static QList<Chat> ftpChat(const QByteArray &userSuffix = QByteArray())
{
return QList<Chat>() << Chat::expect("220")
<< Chat::discardUntil("\r\n")
- << Chat::send("USER anonymous\r\n")
+ << Chat::send("USER anonymous" + userSuffix + "\r\n")
<< Chat::expect("331")
<< Chat::discardUntil("\r\n")
<< Chat::send("PASS user@hostname\r\n")
@@ -479,6 +480,11 @@ void tst_NetworkSelfTest::ftpServer()
netChat(21, ftpChat());
}
+void tst_NetworkSelfTest::ftpProxyServer()
+{
+ netChat(2121, ftpChat("@" + QtNetworkSettings::serverName().toLatin1()));
+}
+
void tst_NetworkSelfTest::imapServer()
{
netChat(143, QList<Chat>()