mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Add tests for #835
Also add ErrnoGuard before `isatty` call, because apparently it can set errno to 25 (ENOTTY).
This commit is contained in:
		| @@ -9,6 +9,7 @@ | ||||
| #define TWOBLUECUBES_CATCH_CONSOLE_COLOUR_IMPL_HPP_INCLUDED | ||||
|  | ||||
| #include "catch_console_colour.hpp" | ||||
| #include "catch_errno_guard.hpp" | ||||
|  | ||||
| namespace Catch { | ||||
|     namespace { | ||||
| @@ -148,6 +149,7 @@ namespace { | ||||
|     }; | ||||
|  | ||||
|     IColourImpl* platformColourInstance() { | ||||
|         ErrnoGuard guard; | ||||
|         Ptr<IConfig const> config = getCurrentContext().getConfig(); | ||||
|         UseColour::YesOrNo colourMode = config | ||||
|             ? config->useColour() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský