Remove fileLineEndingTest from networkselftest.
The fileLineEndingTest case doesn't test network in any way and it is conceptually wrong, too, as any tests where line endings are an issue should be handled with .gitattributes rather than forcing user to check out the repo with unix line endings. Task-number: QTBUG-24271 Change-Id: I73986993edc227cb68b8f61d51cc1cf458d20989 Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>bb10
parent
c7d3f9be58
commit
fc8f92106d
|
|
@ -70,7 +70,6 @@ private slots:
|
|||
void serverReachability();
|
||||
void remotePortsOpen_data();
|
||||
void remotePortsOpen();
|
||||
void fileLineEndingTest();
|
||||
|
||||
// specific protocol tests
|
||||
void ftpServer();
|
||||
|
|
@ -458,31 +457,6 @@ void tst_NetworkSelfTest::remotePortsOpen()
|
|||
QVERIFY(socket.state() == QAbstractSocket::ConnectedState);
|
||||
}
|
||||
|
||||
|
||||
void tst_NetworkSelfTest::fileLineEndingTest()
|
||||
{
|
||||
QString referenceName = SRCDIR "/rfc3252.txt";
|
||||
long long expectedReferenceSize = 25962;
|
||||
|
||||
QString lineEndingType("LF");
|
||||
|
||||
QFile reference(referenceName);
|
||||
QVERIFY(reference.open(QIODevice::ReadOnly));
|
||||
QByteArray byteLine = reference.readLine();
|
||||
if(byteLine.endsWith("\r\n"))
|
||||
lineEndingType = "CRLF";
|
||||
else if(byteLine.endsWith("\r"))
|
||||
lineEndingType = "CR";
|
||||
|
||||
QString referenceAsTextData;
|
||||
QFile referenceAsText(referenceName);
|
||||
QVERIFY(referenceAsText.open(QIODevice::ReadOnly));
|
||||
referenceAsTextData = referenceAsText.readAll();
|
||||
|
||||
QVERIFY2(expectedReferenceSize == referenceAsTextData.length(), QString("Reference file %1 has %2 as line ending and file size not matching - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit());
|
||||
QVERIFY2(!lineEndingType.compare("LF"), QString("Reference file %1 has %2 as line ending - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit());
|
||||
}
|
||||
|
||||
static QList<Chat> ftpChat(const QByteArray &userSuffix = QByteArray())
|
||||
{
|
||||
QList<Chat> rv;
|
||||
|
|
|
|||
Loading…
Reference in New Issue