Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

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
Commit
32186db1b03b0992efd7228a121a16cf2119d8e4
Author
Phil Nash ·
Parents
e54ac70671f2

Files · Download .tar.gz

Changes

 docs/Readme.md                  |  6 +-----
 docs/assertions.md              |  2 +-
 docs/build-systems.md           |  4 ++++
 docs/command-line.md            |  2 +-
 docs/configuration.md           | 23 +++++++++++++++++++++++
 docs/contributing.md            |  2 +-
 docs/logging.md                 |  2 +-
 docs/own-main.md                |  2 +-
 docs/slow-compiles.md           |  2 +-
 docs/test-cases-and-sections.md |  2 +-
 docs/test-fixtures.md           |  2 +-
 docs/tutorial.md                |  2 +-
 docs/whats-changed.md           |  2 +-
 docs/why-catch.md               |  2 +-
 14 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/docs/Readme.md b/docs/Readme.md
index 45350f9a..38b22a58 100644
--- a/docs/Readme.md
+++ b/docs/Readme.md
@@ -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)
-
diff --git a/docs/assertions.md b/docs/assertions.md
index 47826b04..5e839989 100644
--- a/docs/assertions.md
+++ b/docs/assertions.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)
\ No newline at end of file
diff --git a/docs/build-systems.md b/docs/build-systems.md
index 1cb93c87..335b2062 100644
--- a/docs/build-systems.md
+++ b/docs/build-systems.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)
\ No newline at end of file
diff --git a/docs/command-line.md b/docs/command-line.md
index f534d858..d390bf39 100644
--- a/docs/command-line.md
+++ b/docs/command-line.md
@@ -153,4 +153,4 @@ Prints the command line arguments to stdout
 
 ---
 
-[Home](../README.md)
+[Home](Readme.md)
\ No newline at end of file
diff --git a/docs/configuration.md b/docs/configuration.md
new file mode 100644
index 00000000..185eb440
--- /dev/null
+++ b/docs/configuration.md
@@ -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)
\ No newline at end of file
diff --git a/docs/contributing.md b/docs/contributing.md
index 675f3190..5e228362 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -20,4 +20,4 @@ The other directories are ```scripts``` which contains a set of python scripts t
 
 ---
 
-[Home](../README.md)
\ No newline at end of file
+[Home](Readme.md)
\ No newline at end of file
diff --git a/docs/logging.md b/docs/logging.md
index 4be20c59..a659b3e8 100644
--- a/docs/logging.md
+++ b/docs/logging.md
@@ -49,4 +49,4 @@ These macros are now deprecated and are just aliases for INFO and CAPTURE (which
 
 ---
 
-[Home](../README.md)
\ No newline at end of file
+[Home](Readme.md)
\ No newline at end of file
diff --git a/docs/own-main.md b/docs/own-main.md
index 3feda563..f8c836e6 100644
--- a/docs/own-main.md
+++ b/docs/own-main.md
@@ -65,4 +65,4 @@ Catch embeds a powerful command line parser which you can also use to parse your
 
 ---
 
-[Home](../README.md)
\ No newline at end of file
+[Home](Readme.md)
\ No newline at end of file
diff --git a/docs/slow-compiles.md b/docs/slow-compiles.md
index 0673612c..5291aecc 100644
--- a/docs/slow-compiles.md
+++ b/docs/slow-compiles.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)
\ No newline at end of file
diff --git a/docs/test-cases-and-sections.md b/docs/test-cases-and-sections.md
index 863d5faf..28426d78 100644
--- a/docs/test-cases-and-sections.md
+++ b/docs/test-cases-and-sections.md
@@ -57,4 +57,4 @@ Other than the additional prefixes and the formatting in the console reporter th
 
 ---
 
-[Home](../README.md)
\ No newline at end of file
+[Home](Readme.md)
\ No newline at end of file
diff --git a/docs/test-fixtures.md b/docs/test-fixtures.md
index 769f8a37..6bef762b 100644
--- a/docs/test-fixtures.md
+++ b/docs/test-fixtures.md
@@ -29,4 +29,4 @@ The two test cases here will create uniquely-named derived classes of UniqueTest
 
 ---
 
-[Home](../README.md)
\ No newline at end of file
+[Home](Readme.md)
\ No newline at end of file
diff --git a/docs/tutorial.md b/docs/tutorial.md
index a2555f74..1534132a 100644
--- a/docs/tutorial.md
+++ b/docs/tutorial.md
@@ -225,4 +225,4 @@ For more specific information see the [Reference pages](Readme.md)
 
 ---
 
-[Home](../README.md)
+[Home](Readme.md)
\ No newline at end of file
diff --git a/docs/whats-changed.md b/docs/whats-changed.md
index 40b95a6d..10a1bbc5 100644
--- a/docs/whats-changed.md
+++ b/docs/whats-changed.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)
\ No newline at end of file
diff --git a/docs/why-catch.md b/docs/why-catch.md
index d90ee012..93488d22 100644
--- a/docs/why-catch.md
+++ b/docs/why-catch.md
@@ -39,4 +39,4 @@ See the [tutorial](tutorial.md) to get more of a taste of using CATCH in practic
 
 ---
 
-[Home](../README.md)
\ No newline at end of file
+[Home](Readme.md)
\ No newline at end of file