From 3bb9b3017f0169f5c1e5d6e6eb036ffa82a14cd6 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Mon, 26 Aug 2019 07:11:24 -0400 Subject: [PATCH] Try to fix tests on Mingw --- tests/memorial_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/memorial_test.cpp b/tests/memorial_test.cpp index bd9db75f23652..f9399da0d8a85 100644 --- a/tests/memorial_test.cpp +++ b/tests/memorial_test.cpp @@ -30,6 +30,10 @@ void check_memorial( memorial_logger &m, event_bus &b, const std::string &ref, A if( !message.empty() && message.front() == ' ' ) { message.erase( message.begin() ); } + // Remove trailing carriage return, if any + while( !message.empty() && *message.rbegin() == '\r' ) { + message.erase( message.end() - 1 ); + } CHECK( message == ref_lines[i] ); } }