diff --git a/test/testsamples.cpp b/test/testsamples.cpp index f13e7cbf9..8c5a2f768 100644 --- a/test/testsamples.cpp +++ b/test/testsamples.cpp @@ -101,6 +101,11 @@ private: setSettings(set); } +#ifndef _WIN32 + virtual void reportOut(const std::string &outmsg, Color = Color::Reset) override { + std::cout << outmsg << std::endl; + } +#endif }; void runConsoleCodePageTranslationOnWindows() const { diff --git a/test/testsuite.cpp b/test/testsuite.cpp index 685cdcc59..0bd62e41c 100644 --- a/test/testsuite.cpp +++ b/test/testsuite.cpp @@ -23,6 +23,7 @@ #include "redirect.h" #include +#include #include #include @@ -124,8 +125,10 @@ static std::string writestr(const std::string &str, bool gccStyle = false) ostr << "\\t"; else if (*i == '\"') ostr << "\\\""; - else + else if (std::isprint(static_cast(*i))) ostr << *i; + else + ostr << "\\x" << std::hex << short{*i}; } if (!str.empty() && !gccStyle) ostr << std::endl;