summaryrefslogtreecommitdiffstats
path: root/tests/testmerge.cpp
diff options
context:
space:
mode:
authorGravatar Jeremie Guichard <djebrest@gmail.com>2017-02-25 23:00:58 +0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-02-25 09:24:23 -0800
commitf28aab7bd9dbfe59f9cb70bcc25d2c3f6a192849 (patch)
treef5e7ac4d029b9a5cb3bf0c781fa84cd02f98f700 /tests/testmerge.cpp
parent08bc1edc8189a3eab14bb7193abf5270dfe6d235 (diff)
downloadsubsurface-f28aab7bd9dbfe59f9cb70bcc25d2c3f6a192849.tar.gz
Fix trailing '\r' test failure on Windows
Windows implementation of fwrite changes \n to \r\n for files opened in text mode. It caused failures in TestMerge and TestParse when comparing written files against reference data. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
Diffstat (limited to 'tests/testmerge.cpp')
-rw-r--r--tests/testmerge.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/testmerge.cpp b/tests/testmerge.cpp
index 6661880d1..4ff317ad3 100644
--- a/tests/testmerge.cpp
+++ b/tests/testmerge.cpp
@@ -29,7 +29,7 @@ void TestMerge::testMergeEmpty()
QStringList readin = orgS.readAll().split("\n");
QStringList written = outS.readAll().split("\n");
while(readin.size() && written.size()){
- QCOMPARE(readin.takeFirst(), written.takeFirst());
+ QCOMPARE(readin.takeFirst().trimmed(), written.takeFirst().trimmed());
}
clear_dive_file_data();
}
@@ -53,7 +53,7 @@ void TestMerge::testMergeBackwards()
QStringList readin = orgS.readAll().split("\n");
QStringList written = outS.readAll().split("\n");
while(readin.size() && written.size()){
- QCOMPARE(readin.takeFirst(), written.takeFirst());
+ QCOMPARE(readin.takeFirst().trimmed(), written.takeFirst().trimmed());
}
clear_dive_file_data();
}