Commit 9eb39a75 authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[FIX #81] unittest_WTerminalColor working under MAC OSX again.

parent ebd38088
......@@ -62,6 +62,7 @@ void WTerminalColor::generateControlStrings()
m_colorString = "";
m_colorResetString = "";
// When changing this platform specific ifdefs, please adapt unittest too!
#if defined( __linux__ ) || defined( __APPLE__ )
if( m_enabled && ( m_attrib != Default ) )
{
......
......@@ -58,12 +58,12 @@ public:
// generate an own control string
std::ostringstream ss;
#ifdef __linux__
char cStart = 0x1B;
#if defined( __linux__ ) || defined( __APPLE__ )
char cStart = 0x1B; // this is an indirect cast to char, otherwise 0x1B whould be interpreted as number 27
ss << cStart << "[" << 1 << ";" << 31 << ";" << 42 << "m";
#endif
// compare them
TS_ASSERT( ss.str() == c.m_colorString );
TS_ASSERT_EQUALS( ss.str(), c.m_colorString );
}
/**
......@@ -76,7 +76,7 @@ public:
// generate an own control string
std::ostringstream ss;
#ifdef __linux__
#if defined( __linux__ ) || defined( __APPLE__ )
char cStart = 0x1B;
ss << cStart << "[0m";
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment