Don't use ANSI colour codes when debugging

This commit is contained in:
Phil Nash 2013-02-18 13:02:49 +00:00
parent 707c97ed3e
commit dbcd833c72

View File

@ -32,7 +32,7 @@ namespace Catch {
namespace { const char colourEscape = '\033'; } namespace { const char colourEscape = '\033'; }
void TextColour::set( Colours colour ) { void TextColour::set( Colours colour ) {
if( isatty( fileno(stdout) ) ) { if( isatty( fileno(stdout) ) && !isDebuggerActive() ) {
switch( colour ) { switch( colour ) {
case TextColour::FileName: case TextColour::FileName:
std::cout << colourEscape << "[0m"; // white/ normal std::cout << colourEscape << "[0m"; // white/ normal