mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Fix reporter parser spec to use the right key for colour-mode
This commit is contained in:
parent
a51fd07bd0
commit
3c06bcb374
@ -139,7 +139,7 @@ namespace Catch {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
outputFileName = static_cast<std::string>( value );
|
outputFileName = static_cast<std::string>( value );
|
||||||
} else if ( key == "colour" ) {
|
} else if ( key == "colour-mode" ) {
|
||||||
// Duplicated key
|
// Duplicated key
|
||||||
if ( colourMode ) {
|
if ( colourMode ) {
|
||||||
return {};
|
return {};
|
||||||
|
@ -81,7 +81,7 @@ TEST_CASE("Parsing reporter specs", "[cli][reporter-spec][approvals]") {
|
|||||||
{},
|
{},
|
||||||
{ { "Xk1"s, "v1"s }, { "Xk2"s, "=v2"s } } ) );
|
{ { "Xk1"s, "v1"s }, { "Xk2"s, "=v2"s } } ) );
|
||||||
REQUIRE( parseReporterSpec(
|
REQUIRE( parseReporterSpec(
|
||||||
"Foo:bar:reporter::colour=ansi::Xk 1=v 1::Xk2=v:3" ) ==
|
"Foo:bar:reporter::colour-mode=ansi::Xk 1=v 1::Xk2=v:3" ) ==
|
||||||
ReporterSpec( "Foo:bar:reporter",
|
ReporterSpec( "Foo:bar:reporter",
|
||||||
{},
|
{},
|
||||||
Catch::ColourMode::ANSI,
|
Catch::ColourMode::ANSI,
|
||||||
@ -93,9 +93,9 @@ TEST_CASE("Parsing reporter specs", "[cli][reporter-spec][approvals]") {
|
|||||||
// Unknown Catch2 arg (should be "out")
|
// Unknown Catch2 arg (should be "out")
|
||||||
REQUIRE_FALSE( parseReporterSpec( "reporter::output=filename" ) );
|
REQUIRE_FALSE( parseReporterSpec( "reporter::output=filename" ) );
|
||||||
// Wrong colour spec
|
// Wrong colour spec
|
||||||
REQUIRE_FALSE( parseReporterSpec( "reporter::colour=custom" ) );
|
REQUIRE_FALSE( parseReporterSpec( "reporter::colour-mode=custom" ) );
|
||||||
// Duplicated colour spec
|
// Duplicated colour spec
|
||||||
REQUIRE_FALSE( parseReporterSpec( "reporter::colour=ansi::colour=ansi" ) );
|
REQUIRE_FALSE( parseReporterSpec( "reporter::colour-mode=ansi::colour-mode=ansi" ) );
|
||||||
// Duplicated out arg
|
// Duplicated out arg
|
||||||
REQUIRE_FALSE( parseReporterSpec( "reporter::out=f.txt::out=z.txt" ) );
|
REQUIRE_FALSE( parseReporterSpec( "reporter::out=f.txt::out=z.txt" ) );
|
||||||
// Duplicated custom arg
|
// Duplicated custom arg
|
||||||
|
Loading…
Reference in New Issue
Block a user