Fix tst_QSslCertificate::toText on windows

Open the comparison file as text mode, so that it does not differ from
the dumped certificate in CRLF vs LF line endings.

Change-Id: I54d6ea6e37044059e89e762435657ebf5fa6cb39
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Shane Kearns 2012-01-30 14:14:04 +00:00 committed by Qt by Nokia
parent 911ab74161
commit e889d61380

View File

@ -862,11 +862,11 @@ void tst_QSslCertificate::toText()
// Openssl's cert dump method changed slightly between 0.9.8 and 1.0.0 versions, so we want it to match any output
QFile fOld(SRCDIR "more-certificates/cert-large-expiration-date.txt.0.9.8");
QVERIFY(fOld.open(QIODevice::ReadOnly));
QVERIFY(fOld.open(QIODevice::ReadOnly | QFile::Text));
QByteArray txtOld = fOld.readAll();
QFile fNew(SRCDIR "more-certificates/cert-large-expiration-date.txt.1.0.0");
QVERIFY(fNew.open(QIODevice::ReadOnly));
QVERIFY(fNew.open(QIODevice::ReadOnly | QFile::Text));
QByteArray txtNew = fNew.readAll();
QVERIFY(txtOld == cert.toText() || txtNew == cert.toText());
}