tests: use QIODevice::Text in kconfigcompiler_test

This way, different newline endings in OSes are handled as \n when
reading, and thus fixing the comparison on non-\n OSes.
wilder
Pino Toscano 9 years ago
parent 97ec146bd1
commit 1fad690262
  1. 4
      autotests/kconfig_compiler/kconfigcompiler_test.cpp

@ -110,11 +110,11 @@ void KConfigCompiler_Test::testBaselineComparison()
QFile file(QFINDTESTDATA(testName));
QFile fileRef(QFINDTESTDATA(testName + QLatin1String(".ref")));
if (!file.open(QIODevice::ReadOnly)) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
qWarning() << "Failed to open" << file.fileName() << "(" << testName << ")";
QFAIL("Can't open file for comparison");
}
if (!fileRef.open(QIODevice::ReadOnly)) {
if (!fileRef.open(QIODevice::ReadOnly | QIODevice::Text)) {
qWarning() << "Failed to open" << fileRef.fileName() << "(" << testName << ".ref )";
QFAIL("Can't open file for comparison");
}

Loading…
Cancel
Save