mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 05:45:39 +02:00
Refactor colour handling to prepare for per-reporter colour modes
This includes always compiling the ANSI and None colour implementations, as they don't need to touch any platform specific APIs, and removing their respective compile-time configuration options. Because the Win32 colour implementation requires Win32-specific APIs, it is still hidden behind a compile-time toggle, `CATCH_CONFIG_COLOUR_WIN32` (renamed from `..._COLOUR_WINDOWS`). The commandline options for colours were also changed. The option now uses different name, and allows to select between different implementations, rather than changing whether the compiled-in colour implementation is used through "yes/no/default" options.
This commit is contained in:
@@ -473,6 +473,17 @@ set_tests_properties("Reporters::DashAsLocationInReporterSpecSendsOutputToStdout
|
||||
PASS_REGULAR_EXPRESSION "All tests passed \\(5 assertions in 1 test case\\)"
|
||||
)
|
||||
|
||||
add_test(NAME "Colours::ColourModeCanBeExplicitlySetToAnsi"
|
||||
COMMAND
|
||||
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
||||
--reporter console
|
||||
--colour-mode ansi
|
||||
)
|
||||
set_tests_properties("Colours::ColourModeCanBeExplicitlySetToAnsi"
|
||||
PROPERTIES
|
||||
PASS_REGULAR_EXPRESSION "\\[1\;32mAll tests passed"
|
||||
)
|
||||
|
||||
if (CATCH_ENABLE_CONFIGURE_TESTS)
|
||||
add_test(NAME "CMakeConfig::DefaultReporter"
|
||||
COMMAND
|
||||
|
Reference in New Issue
Block a user