mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-16 18:52:25 +01:00
Allow ANSI colour to be compiled on Windows
This enables building with `CATCH_CONFIG_COLOUR_ANSI` on Windows. The changes are taken from v3 commit 0e176c318b
.
This commit is contained in:
parent
182c910b4b
commit
20ace55034
@ -121,7 +121,10 @@ namespace {
|
||||
|
||||
#elif defined( CATCH_CONFIG_COLOUR_ANSI ) //////////////////////////////////////
|
||||
|
||||
#include <unistd.h>
|
||||
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC )
|
||||
# define CATCH_INTERNAL_HAS_ISATTY
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
namespace Catch {
|
||||
namespace {
|
||||
@ -170,7 +173,8 @@ namespace {
|
||||
#if defined(CATCH_PLATFORM_MAC) || defined(CATCH_PLATFORM_IPHONE)
|
||||
!isDebuggerActive() &&
|
||||
#endif
|
||||
#if !(defined(__DJGPP__) && defined(__STRICT_ANSI__))
|
||||
#if defined( CATCH_INTERNAL_HAS_ISATTY ) && \
|
||||
!( defined( __DJGPP__ ) && defined( __STRICT_ANSI__ ) )
|
||||
isatty(STDOUT_FILENO)
|
||||
#else
|
||||
false
|
||||
|
Loading…
Reference in New Issue
Block a user