1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-04-28 20:05:43 +02:00

Fix colourized output to file

This change should be backwards compatible, but it would be better
to make the console colour API take an argument in the long term.

Fixes 
This commit is contained in:
Martin Hořeňovský 2019-01-19 13:29:53 +01:00
parent 4109870435
commit 084b1d5fe6
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 7 additions and 1 deletions

@ -83,6 +83,11 @@ be changed so that hidden tests are included in a run only if they
positively match a testspec. positively match a testspec.
### Console Colour API
The API for Catch2's console colour will be changed to take an extra
argument, the stream to which the colour code should be applied.
--- ---
[Home](Readme.md#top) [Home](Readme.md#top)

@ -160,7 +160,8 @@ namespace {
private: private:
void setColour( const char* _escapeCode ) { void setColour( const char* _escapeCode ) {
Catch::cout() << '\033' << _escapeCode; getCurrentContext().getConfig().stream()
<< '\033' << _escapeCode;
} }
}; };