Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Refined multiline stdout

Commit
f5f130c0702e5731a887e8d58e9781571719ca25
Author
Phil Nash ·
Parents
8431fa1ec598

Files · Download .tar.gz

Changes

 catch_reporter_basic.hpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/catch_reporter_basic.hpp b/catch_reporter_basic.hpp
index 4cf04200..18a63cdc 100644
--- a/catch_reporter_basic.hpp
+++ b/catch_reporter_basic.hpp
@@ -95,7 +95,7 @@ namespace Catch
             // Output the overall test results even if "Started Testing" was not emitted
             m_config.stream() << "[Testing completed. ";
             ReportCounts( succeeded, failed );
-            m_config.stream() << "]" << std::endl;
+            m_config.stream() << "]\n" << std::endl;
         }
         
         ///////////////////////////////////////////////////////////////////////////
@@ -238,7 +238,16 @@ namespace Catch
             if( !stdOut.empty() )
             {
                 StartSpansLazily();
-                m_config.stream() << "[stdout: " << trim( stdOut ) << "]\n";
+                std::string stdOutTrimmed = trim( stdOut );
+                if( stdOutTrimmed.find_first_of( "\r\n" ) == std::string::npos )
+                {
+                    m_config.stream() << "[stdout: " << stdOutTrimmed << "]\n";
+                }
+                else 
+                {
+                    m_config.stream() << "[stdout] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n" << stdOutTrimmed << "\n[end of stdout] <<<<<<<<<<<<<<<<<<<<<<<\n";
+                }
+
             }
 
             if( !stdErr.empty() )