mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Added first cut of docs for configuring Catch
- initially just covers new colour config - also updated all [Home] links in footers to go to local readme
This commit is contained in:
parent
e54ac70671
commit
32186db1b0
@ -9,6 +9,7 @@ Before looking at this material be sure to read the [tutorial](tutorial.md)
|
||||
* [Command line](command-line.md)
|
||||
* [Build systems](build-systems.md)
|
||||
* [Supplying your own main()](own-main.md)
|
||||
* [Configuration](configuration.md)
|
||||
* [Why are my tests slow to compile?](slow-compiles.md)
|
||||
|
||||
Other
|
||||
@ -16,8 +17,3 @@ Other
|
||||
* [Why Catch?](why-catch.md)
|
||||
* [What's changed](whats-changed.md)
|
||||
* [Contributing](contributing.md)
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
|
||||
|
@ -61,4 +61,4 @@ To support Matchers a slightly different form is used. Matchers will be more ful
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -35,3 +35,7 @@ add_subdirectory(${EXT_PROJECTS_DIR}/catch)
|
||||
include_directories(${CATCH_INCLUDE_DIR} ${COMMON_INCLUDES})
|
||||
enable_testing(true) # Enables unit-testing.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
[Home](Readme.md)
|
@ -153,4 +153,4 @@ Prints the command line arguments to stdout
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
23
docs/configuration.md
Normal file
23
docs/configuration.md
Normal file
@ -0,0 +1,23 @@
|
||||
Catch is designed to "just work" as much as possible. For most people the only configuration needed is telling Catch which source file should host all the implementation code (```CATCH_CONFIG_MAIN```).
|
||||
|
||||
Nonetheless there are still some occasions where finer control is needed. For these occasions Catch exposes a small set of macros for configuring how it is built.
|
||||
|
||||
# Terminal colour
|
||||
|
||||
Yes, I am English, so I will continue to spell "colour" with a 'u'.
|
||||
|
||||
When sending output to the terminal, if it detects that it can, Catch will use colourised text. On Windows the Win32 API, ```SetConsoleTextAttribute```, is used. On POSIX systems ANSI colour escape codes are inserted into the stream.
|
||||
|
||||
For finer control you can define one of the following identifiers (these are mutually exclusive - but that is not checked so may behave unexpectedly if you mix them):
|
||||
|
||||
CATCH_CONFIG_COLOUR_NONE // completely disables all text colouring
|
||||
CATCH_CONFIG_COLOUR_WINDOWS // forces the Win32 console API to be used
|
||||
CATCH_CONFIG_COLOUR_ANSI // forces ANSI colour codes to be used
|
||||
|
||||
Note that when ANSI colour codes are used "unistd.h" must be includable - along with a definition of ```isatty()```
|
||||
|
||||
Typically you should place the ```#define``` before #including "catch.hpp" in your main source file - but if you prefer you can define it for your whole project by whatever your IDE or build system provides for you to do so.
|
||||
|
||||
---
|
||||
|
||||
[Home](Readme.md)
|
@ -20,4 +20,4 @@ The other directories are ```scripts``` which contains a set of python scripts t
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -49,4 +49,4 @@ These macros are now deprecated and are just aliases for INFO and CAPTURE (which
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -65,4 +65,4 @@ Catch embeds a powerful command line parser which you can also use to parse your
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -19,4 +19,4 @@ As a result the main source file *does* compile the whole of Catch every time! S
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -57,4 +57,4 @@ Other than the additional prefixes and the formatting in the console reporter th
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -29,4 +29,4 @@ The two test cases here will create uniquely-named derived classes of UniqueTest
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -225,4 +225,4 @@ For more specific information see the [Reference pages](Readme.md)
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -21,4 +21,4 @@ If you find any issues please raise issue tickets on the [issue tracker on GitHu
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
@ -39,4 +39,4 @@ See the [tutorial](tutorial.md) to get more of a taste of using CATCH in practic
|
||||
|
||||
---
|
||||
|
||||
[Home](../README.md)
|
||||
[Home](Readme.md)
|
Loading…
Reference in New Issue
Block a user