mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +01:00
Force disable console colours for tests that regex check output
Fixes #2458
This commit is contained in:
parent
372b7575f6
commit
338e4ec1f8
@ -311,6 +311,7 @@ add_test(
|
|||||||
$<TARGET_FILE:SelfTest> "#2025: same-level sections"
|
$<TARGET_FILE:SelfTest> "#2025: same-level sections"
|
||||||
-c "A"
|
-c "A"
|
||||||
-c "B"
|
-c "B"
|
||||||
|
--colour-mode none
|
||||||
)
|
)
|
||||||
set_tests_properties(FilteredSection::GeneratorsDontCauseInfiniteLoop-2
|
set_tests_properties(FilteredSection::GeneratorsDontCauseInfiniteLoop-2
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
@ -394,6 +395,7 @@ add_test(NAME "Benchmarking::SkipBenchmarkMacros"
|
|||||||
$<TARGET_FILE:SelfTest> "Skip benchmark macros"
|
$<TARGET_FILE:SelfTest> "Skip benchmark macros"
|
||||||
--reporter console
|
--reporter console
|
||||||
--skip-benchmarks
|
--skip-benchmarks
|
||||||
|
--colour-mode none
|
||||||
)
|
)
|
||||||
set_tests_properties("Benchmarking::SkipBenchmarkMacros"
|
set_tests_properties("Benchmarking::SkipBenchmarkMacros"
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
@ -501,6 +503,7 @@ add_test(NAME "Outputs::DashAsOutLocationSendsOutputToStdout"
|
|||||||
COMMAND
|
COMMAND
|
||||||
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
||||||
--out=-
|
--out=-
|
||||||
|
--colour-mode none
|
||||||
)
|
)
|
||||||
set_tests_properties("Outputs::DashAsOutLocationSendsOutputToStdout"
|
set_tests_properties("Outputs::DashAsOutLocationSendsOutputToStdout"
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
@ -511,6 +514,7 @@ add_test(NAME "Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
|
|||||||
COMMAND
|
COMMAND
|
||||||
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
||||||
--reporter console::out=-
|
--reporter console::out=-
|
||||||
|
--colour-mode none
|
||||||
)
|
)
|
||||||
set_tests_properties("Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
|
set_tests_properties("Reporters::DashAsLocationInReporterSpecSendsOutputToStdout"
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
@ -202,21 +202,21 @@ print(" " + cmdPath)
|
|||||||
|
|
||||||
## special cases first:
|
## special cases first:
|
||||||
# Standard console reporter
|
# Standard console reporter
|
||||||
approve("console.std", ["~[!nonportable]~[!benchmark]~[approvals] *", "--order", "lex", "--rng-seed", "1"])
|
approve("console.std", ["~[!nonportable]~[!benchmark]~[approvals] *", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"])
|
||||||
# console reporter, include passes, warn about No Assertions, limit failures to first 4
|
# console reporter, include passes, warn about No Assertions, limit failures to first 4
|
||||||
approve("console.swa4", ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "-x", "4", "--order", "lex", "--rng-seed", "1"])
|
approve("console.swa4", ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "-x", "4", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"])
|
||||||
|
|
||||||
## Common reporter checks: include passes, warn about No Assertions
|
## Common reporter checks: include passes, warn about No Assertions
|
||||||
reporters = ('console', 'junit', 'xml', 'compact', 'sonarqube', 'tap', 'teamcity', 'automake')
|
reporters = ('console', 'junit', 'xml', 'compact', 'sonarqube', 'tap', 'teamcity', 'automake')
|
||||||
for reporter in reporters:
|
for reporter in reporters:
|
||||||
filename = '{}.sw'.format(reporter)
|
filename = '{}.sw'.format(reporter)
|
||||||
common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1"]
|
common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"]
|
||||||
reporter_args = ['-r', reporter]
|
reporter_args = ['-r', reporter]
|
||||||
approve(filename, common_args + reporter_args)
|
approve(filename, common_args + reporter_args)
|
||||||
|
|
||||||
## All reporters at the same time
|
## All reporters at the same time
|
||||||
|
|
||||||
common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1"]
|
common_args = ["~[!nonportable]~[!benchmark]~[approvals] *", "-s", "-w", "NoAssertions", "--order", "lex", "--rng-seed", "1", "--colour-mode", "none"]
|
||||||
filenames = ['{}.sw.multi'.format(reporter) for reporter in reporters]
|
filenames = ['{}.sw.multi'.format(reporter) for reporter in reporters]
|
||||||
reporter_args = []
|
reporter_args = []
|
||||||
for reporter, filename in zip(reporters, filenames):
|
for reporter, filename in zip(reporters, filenames):
|
||||||
|
Loading…
Reference in New Issue
Block a user