diff options
| author | Maciej Patro | 2018-10-22 15:59:01 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2018-10-25 15:43:30 +0200 |
| commit | 8b3c09c137b532ca1480d267ae9dc367b889a408 (patch) | |
| tree | 58db12ea9ab40acc52445ac44477fce3ddbd043c /projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp | |
| parent | b7f41237b1329ac3f7119beedc47c9b9f924571e (diff) | |
| download | catch3-8b3c09c137b532ca1480d267ae9dc367b889a408.tar.gz | |
Catch's CLI now checks whether requested reporter exists
Fixes #1351
Diffstat (limited to 'projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp')
| -rw-r--r-- | projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index cb635ead..9b5b0ed7 100644 --- a/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -280,7 +280,6 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" CHECK(config.processName == ""); } - SECTION("default - no arguments") { auto result = cli.parse({"test"}); CHECK(result); @@ -345,8 +344,15 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" SECTION("Only one reporter is accepted") { REQUIRE_FALSE(cli.parse({ "test", "-r", "xml", "-r", "junit" })); } - } + SECTION("must match one of the available ones") { + auto result = cli.parse({"test", "--reporter", "unsupported"}); + CHECK(!result); +#ifndef CATCH_CONFIG_DISABLE_MATCHERS + REQUIRE_THAT(result.errorMessage(), Contains("Unrecognized reporter")); +#endif + } + } SECTION("debugger") { SECTION("-b") { |