diff options
author | Pino Toscano <pino@kde.org> | 2017-05-26 00:57:35 +0200 |
---|---|---|
committer | Pino Toscano <pino@kde.org> | 2017-05-26 00:57:35 +0200 |
commit | 1fad6902629191558e53ea9b58a8a67a0bfc9440 (patch) | |
tree | 15070482e0bf8fb195b8614588d9abd6d6e6e484 /autotests/kconfig_compiler/kconfigcompiler_test.cpp | |
parent | 97ec146bd109109ac11e3c573625b47bfa4fd4ff (diff) | |
download | kconfig-1fad6902629191558e53ea9b58a8a67a0bfc9440.tar.gz kconfig-1fad6902629191558e53ea9b58a8a67a0bfc9440.tar.bz2 |
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.
Diffstat (limited to 'autotests/kconfig_compiler/kconfigcompiler_test.cpp')
-rw-r--r-- | autotests/kconfig_compiler/kconfigcompiler_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autotests/kconfig_compiler/kconfigcompiler_test.cpp b/autotests/kconfig_compiler/kconfigcompiler_test.cpp index 61de0b61..752af57f 100644 --- a/autotests/kconfig_compiler/kconfigcompiler_test.cpp +++ b/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"); } |