Commit Graph

36 Commits

Author SHA1 Message Date
Martin Hořeňovský ace70407a2 Add tests for #835
Also add ErrnoGuard before `isatty` call, because apparently it can set
errno to 25 (ENOTTY).
2017-03-06 22:07:33 +01:00
Martin Hořeňovský afe46ff270 Extracted NOMINMAX and WIN32_LEAN_AND_MEAN guards into a proxy header 2017-01-16 16:52:44 +01:00
Martin Hořeňovský b3907a78e1 Added NOMINMAX and WIN32_LEAN_AND_MEAN defines before including windows.h
This stops the `windows.h` header from defining `min` and `max` macros
and including lot of Windows APIs that are not needed by Catch.
2017-01-12 16:00:02 +01:00
Philipp Claßen 8d1e240700 Fixed shell color code of "Blue" 2017-01-07 10:30:43 +01:00
Phil Nash 8ccb18daa9 Added --use-colour option to give finer control over colourisation.
--force-colour is still present but deprecated (will remove in v2)
2016-02-29 08:03:48 +00:00
csa 6160a2b079 Fix for white background in windows powershell when using colour output.
This commit fixes the white background that appears in windows powershell
when catch outputs messages with colour. The previous implementation
ignored the original background colour and defaulted to a white background.
2015-07-03 12:02:40 +02:00
Peter Huene e5280b2c57 Add --force-colour option to force colour output.
Adding a --force-colour option to force colour output on POSIX systems,
provided a debugger is not attached.

This allows for Catch to output colours even if STDOUT is not a tty,
which can be the case when the test executable is being spawned by a
parent process (e.g. CMake's ctest).
2015-02-11 13:12:42 -08:00
Phil Nash bde3567f3e Cleaned up terminal colouring impl and added more config options 2014-10-21 07:24:30 +01:00
Phil Nash 383d7c06a1 Only use std::cout/ cert via Catch::cout/ cert - and make those conditional on CATCH_CONFIG_NOSTDOUT 2014-10-02 19:08:19 +01:00
Phil Nash a469d9bc0f Made Colour copyable to remove warning 2014-07-09 07:36:12 +01:00
Phil Nash 20cad7cb1d Tags beginning with a non alpha-numeric character are now disallowed.
Added !throws special tag which denotes a test case to be skipped when run with -e
(the idea being that the test case is expected to throw an exception which is not caught within a XXX_THROWS assertion).
2014-04-15 18:44:37 +01:00
Petter Strandmark c032dfa41c Fix fileno not always present. fileno(stdout) = STDOUT_FILENO.
This was a problem when compiling on Cygwin with gcc 4.8.
2013-11-26 23:20:05 +01:00
Phil Nash f3d1f08c3b Removed all trailing whitespace
- addresses #105
2013-07-03 19:14:59 +01:00
Phil Nash ba9b2b5a37 Use MFCs windows include if present 2013-07-01 18:44:40 +01:00
Phil Nash 4b5e008b20 guard NOMINMAX definition (windows) 2013-06-29 20:31:17 +01:00
Phil Nash 5ddd6e31e4 Added #define NOMINMAX
- thanks to @robson3 in #171
2013-06-14 19:18:13 +01:00
Phil Nash cd9c72c66f Fixed BrightGreen in ANSI/ Posix case
- was yellow :-s
2013-04-09 19:49:58 +01:00
Phil Nash 4746caacaf LineWrapper can indent first line differently to subsequent lines
- use this to wrap Given/ When/ Then with indent after the :
2013-04-05 20:55:57 +01:00
Phil Nash f186a912d4 Switched TextColour out for Colour
- Removed TextColour
2013-04-05 07:59:28 +01:00
Phil Nash a3703faa0a First cut of new Colour class (to replace TextColour) 2013-04-05 07:47:36 +01:00
Phil Nash 2c90533a26 More formatting/ colour tweaks 2013-04-01 11:25:54 +01:00
Phil Nash 2a17ef9081 Use SecondaryText code in lists 2013-03-29 21:55:19 +00:00
Phil Nash c7e602f3f2 Added SecondaryText colour enum
- slightly refactored ConsoleColour as well
2013-03-29 21:39:43 +00:00
Phil Nash d78cfe1275 Tweaked colours again 2013-03-12 18:47:01 +00:00
Phil Nash 3df6c0d1b4 Refactored ConsoleColour impl. Tweaked the (Windows) colours a bit.
Also fixed issue that would cause warnings on some compilers when doing REQUIRE( p ); where p is a pointer.
Moved to build 23
2013-03-11 18:38:29 +00:00
Phil Nash 767f1588dc Added StringMaker (for partially specialising string conversions), extended BDD macros and moved file/line info to top of message.
Re-enable ANSI colour by default - hopefully properly excluding Windows this time
2013-03-04 12:19:15 +01:00
Phil Nash ead139e094 Reverted ANSI colour change (it was failing for Windows)
Produced build 20
2013-02-19 19:59:04 +00:00
Phil Nash f45e09a416 Default to using colour in unix based terminals 2013-02-19 08:19:00 +00:00
Phil Nash dbcd833c72 Don't use ANSI colour codes when debugging 2013-02-18 13:02:49 +00:00
Phil Nash 2a1e8bfc6e Updated colour comments 2012-11-01 08:16:15 +00:00
Phil Nash 355b95fda1 Cleaned up ANSI colour code impl a bit 2012-10-31 18:04:22 +00:00
Phil Nash 108f1937d8 Added terminal colour codes for POSIX
With thanks to Adam Strzelecki
2012-10-29 20:46:45 +00:00
Phil Nash 6cd2ac7544 More reformatting 2012-05-16 08:02:20 +01:00
Phil Nash af8d0b3955 Fixed trim() for single char strings (github #75) 2012-02-28 20:04:25 +00:00
Phil Nash e1f1c6ca7e Fixed iOS test runner after reporter changes 2012-02-27 19:03:54 +00:00
Phil Nash 20df8c5da1 Added colorised console output for Windows
Also tweaks the output again
2012-02-25 20:36:22 +00:00