From fc8f92106d6743d4165de7d8a440b7e5dbd14391 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 14 Feb 2012 15:47:27 +0200 Subject: [PATCH] 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 --- .../other/networkselftest/tst_networkselftest.cpp | 26 ---------------------- 1 file changed, 26 deletions(-) diff --git a/tests/auto/other/networkselftest/tst_networkselftest.cpp b/tests/auto/other/networkselftest/tst_networkselftest.cpp index c1a3cd1..99d4ac9 100644 --- a/tests/auto/other/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/other/networkselftest/tst_networkselftest.cpp @@ -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 ftpChat(const QByteArray &userSuffix = QByteArray()) { QList rv; -- 2.7.4