From e889d61380cbb47e29ccd75d712a4b4a66031899 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 30 Jan 2012 14:14:04 +0000 Subject: [PATCH] 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 --- tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp index 75c3c87..8003ad1 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -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()); } -- 2.7.4