From 6a12a6a4cda703239b008a940a84f71104b7fbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6fferlein?= Date: Tue, 11 Sep 2018 07:35:01 +0200 Subject: [PATCH] Normalize CRLF for OASIS reader test's golden data on Windows. --- src/plugins/streamers/oasis/unit_tests/dbOASISReader.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/streamers/oasis/unit_tests/dbOASISReader.cc b/src/plugins/streamers/oasis/unit_tests/dbOASISReader.cc index 87e2303e6..d24706a77 100644 --- a/src/plugins/streamers/oasis/unit_tests/dbOASISReader.cc +++ b/src/plugins/streamers/oasis/unit_tests/dbOASISReader.cc @@ -54,9 +54,12 @@ compare_ref (tl::TestBase *_this, const char *test, const db::Layout &layout) // ignore read errors on au files -> this way they can be updated easily } + // Normalize the golden data's CRLF line breaks on Windows + au = tl::replaced (au, "\r\n", "\n"); + if (au != oss) { - EXPECT_EQ (std::string (os.string ()), au) + EXPECT_EQ (oss, au) std::string fn (_this->tmp_file (std::string ("t") + test + "_au.txt")); { @@ -67,7 +70,7 @@ compare_ref (tl::TestBase *_this, const char *test, const db::Layout &layout) tl::info << "To update golden data use"; tl::info << " cp " << fn << " " << tl::absolute_file_path (fn_au); -#if 1 // auto update +#if 0 // auto update system ((std::string ("cp ") + fn + " " + tl::absolute_file_path (fn_au)).c_str ()); tl::info << "Golden data updated."; #endif