summaryrefslogtreecommitdiffstats
path: root/tests/auto/qftp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qftp')
-rw-r--r--tests/auto/qftp/.gitattributes2
-rw-r--r--tests/auto/qftp/qftp.pro5
-rw-r--r--tests/auto/qftp/tst_qftp.cpp30
3 files changed, 30 insertions, 7 deletions
diff --git a/tests/auto/qftp/.gitattributes b/tests/auto/qftp/.gitattributes
index d220f58..e04709a 100644
--- a/tests/auto/qftp/.gitattributes
+++ b/tests/auto/qftp/.gitattributes
@@ -1 +1 @@
-rfc3252.txt -cflf Unset
+rfc3252.txt -crlf
diff --git a/tests/auto/qftp/qftp.pro b/tests/auto/qftp/qftp.pro
index 84d8c19..c060296 100644
--- a/tests/auto/qftp/qftp.pro
+++ b/tests/auto/qftp/qftp.pro
@@ -9,6 +9,11 @@ wince*: {
addFiles.path = .
DEPLOYMENT += addFiles
DEFINES += SRCDIR=\\\"\\\"
+} else:symbian* {
+ addFiles.sources = rfc3252.txt
+ addFiles.path = .
+ DEPLOYMENT += addFiles
+ TARGET.EPOCHEAPSIZE="0x100 0x1000000"
} else {
DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 7fa5601..c60a5cd 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -51,11 +51,22 @@
#include <stdlib.h>
#include <QNetworkProxy>
+#ifndef TEST_QNETWORK_PROXY
+#define TEST_QNETWORK_PROXY
+#endif
#include "../network-settings.h"
//TESTED_CLASS=
//TESTED_FILES=
+#ifdef Q_OS_SYMBIAN
+// In Symbian OS test data is located in applications private dir
+// Application private dir is default serach path for files, so SRCDIR can be set to empty
+#define SRCDIR ""
+#endif
+
+
+
class tst_QFtp : public QObject
{
Q_OBJECT
@@ -178,11 +189,11 @@ const int bytesDone_init = -10;
tst_QFtp::tst_QFtp()
{
+ Q_SET_DEFAULT_IAP
}
tst_QFtp::~tst_QFtp()
{
-
}
void tst_QFtp::initTestCase_data()
@@ -191,9 +202,11 @@ void tst_QFtp::initTestCase_data()
QTest::addColumn<int>("proxyType");
QTest::newRow("WithoutProxy") << false << 0;
+#ifdef TEST_QNETWORK_PROXY
QTest::newRow("WithSocks5Proxy") << true << int(QNetworkProxy::Socks5Proxy);
//### doesn't work well yet.
//QTest::newRow("WithHttpProxy") << true << int(QNetworkProxy::HttpProxy);
+#endif
}
void tst_QFtp::initTestCase()
@@ -1144,7 +1157,7 @@ QDataStream &operator>>( QDataStream &s, FtpCommand &command )
}
Q_DECLARE_METATYPE(QList<FtpCommand>)
- void tst_QFtp::commandSequence_data()
+void tst_QFtp::commandSequence_data()
{
// some "constants"
QStringList argConnectToHost01;
@@ -1279,8 +1292,8 @@ void tst_QFtp::abort_data()
QTest::newRow( "get_fluke01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/bigfile") << QByteArray();
QTest::newRow( "get_fluke02" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/rfc3252") << QByteArray();
- // Qt/CE test environment has to less memory for this test
-#if !defined(Q_OS_WINCE)
+ // Qt/CE and Symbian test environment has to less memory for this test
+#if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
QByteArray bigData( 10*1024*1024, 0 );
bigData.fill( 'B' );
@@ -1501,7 +1514,6 @@ void tst_QFtp::proxy()
void tst_QFtp::binaryAscii()
{
-
QString file = "asciifile%1.txt";
if(file.contains('%'))
@@ -1544,11 +1556,16 @@ void tst_QFtp::binaryAscii()
ResMapIt it2 = resultMap.find(QFtp::Get);
QVERIFY(it2 != resultMap.end());
QVERIFY(it2.value().success);
+/*
+#ifdef Q_OS_SYMBIAN
+ QVERIFY(getData.size() == putData.size());
+#else
+*/
// most modern ftp servers leave the file as it is by default
// (and do not remove the windows line ending), the -1 below could be
// deleted in the future
QVERIFY(getData.size() == putData.size()-1);
-
+//#endi
//////////////////////////////////////////////////////////////////
// cleanup (i.e. remove the file) -- this also tests the remove command
init();
@@ -2042,4 +2059,5 @@ void tst_QFtp::cdUpSlot(bool error)
}
QTEST_MAIN(tst_QFtp)
+
#include "tst_qftp.moc"