From 60442bb1b95399ca88154078734c289af72063d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Tue, 26 Oct 2021 23:26:07 +0200 Subject: [PATCH] Improve shardIndex/Count cli argument parsing --- src/catch2/internal/catch_commandline.cpp | 39 +++- .../Baselines/automake.sw.approved.txt | 1 + .../Baselines/compact.sw.approved.txt | 18 +- .../Baselines/console.std.approved.txt | 4 +- .../Baselines/console.sw.approved.txt | 164 +++++++++------ .../SelfTest/Baselines/junit.sw.approved.txt | 11 +- .../Baselines/sonarqube.sw.approved.txt | 9 +- tests/SelfTest/Baselines/tap.sw.approved.txt | 38 ++-- .../Baselines/teamcity.sw.approved.txt | 2 + tests/SelfTest/Baselines/xml.sw.approved.txt | 187 +++++++++++------- .../IntrospectiveTests/CmdLine.tests.cpp | 54 +++-- 11 files changed, 354 insertions(+), 173 deletions(-) diff --git a/src/catch2/internal/catch_commandline.cpp b/src/catch2/internal/catch_commandline.cpp index 5f8a44d566..6cf71b77a0 100644 --- a/src/catch2/internal/catch_commandline.cpp +++ b/src/catch2/internal/catch_commandline.cpp @@ -150,15 +150,42 @@ namespace Catch { return ParserResult::ok( ParseResultType::Matched ); }; auto const setShardCount = [&]( std::string const& shardCount ) { - auto result = Clara::Detail::convertInto( shardCount, config.shardCount ); + CATCH_TRY{ + std::size_t parsedTo = 0; + int64_t parsedCount = std::stoll(shardCount, &parsedTo, 0); + if (parsedTo != shardCount.size()) { + return ParserResult::runtimeError("Could not parse '" + shardCount + "' as shard count"); + } + if (parsedCount <= 0) { + return ParserResult::runtimeError("Shard count must be a positive number"); + } - if (config.shardCount == 0) { - return ParserResult::runtimeError( "The shard count must be greater than 0" ); - } else { - return result; + config.shardCount = static_cast(parsedCount); + return ParserResult::ok(ParseResultType::Matched); + } CATCH_CATCH_ANON(std::exception const&) { + return ParserResult::runtimeError("Could not parse '" + shardCount + "' as shard count"); } }; + auto const setShardIndex = [&](std::string const& shardIndex) { + CATCH_TRY{ + std::size_t parsedTo = 0; + int64_t parsedIndex = std::stoll(shardIndex, &parsedTo, 0); + if (parsedTo != shardIndex.size()) { + return ParserResult::runtimeError("Could not parse '" + shardIndex + "' as shard index"); + } + if (parsedIndex < 0) { + return ParserResult::runtimeError("Shard index must be a non-negative number"); + } + + config.shardIndex = static_cast(parsedIndex); + return ParserResult::ok(ParseResultType::Matched); + } CATCH_CATCH_ANON(std::exception const&) { + return ParserResult::runtimeError("Could not parse '" + shardIndex + "' as shard index"); + } + }; + + auto cli = ExeName( config.processName ) | Help( config.showHelp ) @@ -252,7 +279,7 @@ namespace Catch { | Opt( setShardCount, "shard count" ) ["--shard-count"] ( "split the tests to execute into this many groups" ) - | Opt( config.shardIndex, "shard index" ) + | Opt( setShardIndex, "shard index" ) ["--shard-index"] ( "index of the group of tests to execute (see --shard-count)" ) | Arg( config.testsOrTags, "test name|pattern|tags" ) diff --git a/tests/SelfTest/Baselines/automake.sw.approved.txt b/tests/SelfTest/Baselines/automake.sw.approved.txt index 0860a79ebb..46945798d0 100644 --- a/tests/SelfTest/Baselines/automake.sw.approved.txt +++ b/tests/SelfTest/Baselines/automake.sw.approved.txt @@ -177,6 +177,7 @@ Nor would this :test-result: FAIL Output from all sections is reported :test-result: PASS Overloaded comma or address-of operators are not used :test-result: PASS Parse test names and tags +:test-result: PASS Parsing sharding-related cli flags :test-result: PASS Pointers can be compared to null :test-result: PASS Precision of floating point stringification can be set :test-result: PASS Predicate matcher can accept const char* diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt index 3f39422ebc..b28f9ac1e9 100644 --- a/tests/SelfTest/Baselines/compact.sw.approved.txt +++ b/tests/SelfTest/Baselines/compact.sw.approved.txt @@ -1178,6 +1178,18 @@ CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("hidden an CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !false CmdLine.tests.cpp:: passed: !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false CmdLine.tests.cpp:: passed: spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-count=8" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardCount == 8 for: 8 == 8 +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=2" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardIndex == 2 for: 2 == 2 +CmdLine.tests.cpp:: passed: !(result) for: !{?} +CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" +CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=0" }) for: {?} +CmdLine.tests.cpp:: passed: config.shardIndex == 0 for: 0 == 0 Condition.tests.cpp:: passed: p == 0 for: 0 == 0 Condition.tests.cpp:: passed: p == pNULL for: 0 == 0 Condition.tests.cpp:: passed: p != 0 for: 0x != 0 @@ -1273,12 +1285,6 @@ CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-no-ana CmdLine.tests.cpp:: passed: config.benchmarkNoAnalysis for: true CmdLine.tests.cpp:: passed: cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?} CmdLine.tests.cpp:: passed: config.benchmarkWarmupTime == 10 for: 10 == 10 -CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-count=8"}) for: {?} -CmdLine.tests.cpp:: passed: config.shardCount == 8 for: 8 == 8 -CmdLine.tests.cpp:: passed: cli.parse({ "test", "--shard-index=2"}) for: {?} -CmdLine.tests.cpp:: passed: config.shardIndex == 2 for: 2 == 2 -CmdLine.tests.cpp:: passed: !result for: true -CmdLine.tests.cpp:: passed: result.errorMessage(), ContainsSubstring( "The shard count must be greater than 0" ) for: "The shard count must be greater than 0" contains: "The shard count must be greater than 0" Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 3 >= 1 Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 2 >= 1 Misc.tests.cpp:: passed: std::tuple_size::value >= 1 for: 1 >= 1 diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt index af7fb09cea..f513b37e94 100644 --- a/tests/SelfTest/Baselines/console.std.approved.txt +++ b/tests/SelfTest/Baselines/console.std.approved.txt @@ -1426,6 +1426,6 @@ due to unexpected exception with message: Why would you throw a std::string? =============================================================================== -test cases: 373 | 296 passed | 70 failed | 7 failed as expected -assertions: 2121 | 1965 passed | 129 failed | 27 failed as expected +test cases: 374 | 297 passed | 70 failed | 7 failed as expected +assertions: 2127 | 1971 passed | 129 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt index 189944cb0e..e9d9d9a726 100644 --- a/tests/SelfTest/Baselines/console.sw.approved.txt +++ b/tests/SelfTest/Baselines/console.sw.approved.txt @@ -8602,6 +8602,111 @@ CmdLine.tests.cpp:: PASSED: with expansion: true +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + shard-count +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-count=8" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardCount == 8 ) +with expansion: + 8 == 8 + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Negative shard count reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard count must be a positive number") ) +with expansion: + "Shard count must be a positive number" contains: "Shard count must be a + positive number" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Zero shard count reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard count must be a positive number") ) +with expansion: + "Shard count must be a positive number" contains: "Shard count must be a + positive number" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + shard-index +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-index=2" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardIndex == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Negative shard index reports error +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK_FALSE( result ) +with expansion: + !{?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE_THAT( result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") ) +with expansion: + "Shard index must be a non-negative number" contains: "Shard index must be a + non-negative number" + +------------------------------------------------------------------------------- +Parsing sharding-related cli flags + Shard index 0 is accepted +------------------------------------------------------------------------------- +CmdLine.tests.cpp: +............................................................................... + +CmdLine.tests.cpp:: PASSED: + CHECK( cli.parse({ "test", "--shard-index=0" }) ) +with expansion: + {?} + +CmdLine.tests.cpp:: PASSED: + REQUIRE( config.shardIndex == 0 ) +with expansion: + 0 == 0 + ------------------------------------------------------------------------------- Pointers can be compared to null ------------------------------------------------------------------------------- @@ -9390,61 +9495,6 @@ CmdLine.tests.cpp:: PASSED: with expansion: 10 == 10 -------------------------------------------------------------------------------- -Process can be configured on command line - Sharding options - shard-count -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( cli.parse({ "test", "--shard-count=8"}) ) -with expansion: - {?} - -CmdLine.tests.cpp:: PASSED: - REQUIRE( config.shardCount == 8 ) -with expansion: - 8 == 8 - -------------------------------------------------------------------------------- -Process can be configured on command line - Sharding options - shard-index -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( cli.parse({ "test", "--shard-index=2"}) ) -with expansion: - {?} - -CmdLine.tests.cpp:: PASSED: - REQUIRE( config.shardIndex == 2 ) -with expansion: - 2 == 2 - -------------------------------------------------------------------------------- -Process can be configured on command line - Sharding options - Zero shard-count -------------------------------------------------------------------------------- -CmdLine.tests.cpp: -............................................................................... - -CmdLine.tests.cpp:: PASSED: - CHECK( !result ) -with expansion: - true - -CmdLine.tests.cpp:: PASSED: - CHECK_THAT( result.errorMessage(), ContainsSubstring( "The shard count must be greater than 0" ) ) -with expansion: - "The shard count must be greater than 0" contains: "The shard count must be - greater than 0" - ------------------------------------------------------------------------------- Product with differing arities - std::tuple ------------------------------------------------------------------------------- @@ -17094,6 +17144,6 @@ Misc.tests.cpp: Misc.tests.cpp:: PASSED: =============================================================================== -test cases: 373 | 280 passed | 86 failed | 7 failed as expected -assertions: 2138 | 1965 passed | 146 failed | 27 failed as expected +test cases: 374 | 281 passed | 86 failed | 7 failed as expected +assertions: 2144 | 1971 passed | 146 failed | 27 failed as expected diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index ab55d93c1e..21e3dbd205 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -1,7 +1,7 @@ - + @@ -1060,6 +1060,12 @@ Message.tests.cpp: + + + + + + @@ -1096,9 +1102,6 @@ Message.tests.cpp: - - - diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt index 4f5e0b12d0..e83a3532ae 100644 --- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt @@ -43,6 +43,12 @@ + + + + + + @@ -75,9 +81,6 @@ - - - diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt index e5247b5f7c..b306f5cb65 100644 --- a/tests/SelfTest/Baselines/tap.sw.approved.txt +++ b/tests/SelfTest/Baselines/tap.sw.approved.txt @@ -2278,6 +2278,30 @@ ok {test-number} - !(spec.matches(*fakeTestCase("only foo", "[foo]"))) for: !fal ok {test-number} - !(spec.matches(*fakeTestCase("only hidden", "[.]"))) for: !false # Parse test names and tags ok {test-number} - spec.matches(*fakeTestCase("neither foo nor hidden", "[bar]")) for: true +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-count=8" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardCount == 8 for: 8 == 8 +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring("Shard count must be a positive number") for: "Shard count must be a positive number" contains: "Shard count must be a positive number" +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-index=2" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardIndex == 2 for: 2 == 2 +# Parsing sharding-related cli flags +ok {test-number} - !(result) for: !{?} +# Parsing sharding-related cli flags +ok {test-number} - result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") for: "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" +# Parsing sharding-related cli flags +ok {test-number} - cli.parse({ "test", "--shard-index=0" }) for: {?} +# Parsing sharding-related cli flags +ok {test-number} - config.shardIndex == 0 for: 0 == 0 # Pointers can be compared to null ok {test-number} - p == 0 for: 0 == 0 # Pointers can be compared to null @@ -2468,18 +2492,6 @@ ok {test-number} - config.benchmarkNoAnalysis for: true ok {test-number} - cli.parse({ "test", "--benchmark-warmup-time=10" }) for: {?} # Process can be configured on command line ok {test-number} - config.benchmarkWarmupTime == 10 for: 10 == 10 -# Process can be configured on command line -ok {test-number} - cli.parse({ "test", "--shard-count=8"}) for: {?} -# Process can be configured on command line -ok {test-number} - config.shardCount == 8 for: 8 == 8 -# Process can be configured on command line -ok {test-number} - cli.parse({ "test", "--shard-index=2"}) for: {?} -# Process can be configured on command line -ok {test-number} - config.shardIndex == 2 for: 2 == 2 -# Process can be configured on command line -ok {test-number} - !result for: true -# Process can be configured on command line -ok {test-number} - result.errorMessage(), ContainsSubstring( "The shard count must be greater than 0" ) for: "The shard count must be greater than 0" contains: "The shard count must be greater than 0" # Product with differing arities - std::tuple ok {test-number} - std::tuple_size::value >= 1 for: 3 >= 1 # Product with differing arities - std::tuple @@ -4278,5 +4290,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0 ok {test-number} - # xmlentitycheck ok {test-number} - -1..2138 +1..2144 diff --git a/tests/SelfTest/Baselines/teamcity.sw.approved.txt b/tests/SelfTest/Baselines/teamcity.sw.approved.txt index ef70e14c18..6b3336d663 100644 --- a/tests/SelfTest/Baselines/teamcity.sw.approved.txt +++ b/tests/SelfTest/Baselines/teamcity.sw.approved.txt @@ -459,6 +459,8 @@ Message.tests.cpp:|nexplicit failure with message:|n "Message from ##teamcity[testFinished name='Overloaded comma or address-of operators are not used' duration="{duration}"] ##teamcity[testStarted name='Parse test names and tags'] ##teamcity[testFinished name='Parse test names and tags' duration="{duration}"] +##teamcity[testStarted name='Parsing sharding-related cli flags'] +##teamcity[testFinished name='Parsing sharding-related cli flags' duration="{duration}"] ##teamcity[testStarted name='Pointers can be compared to null'] ##teamcity[testFinished name='Pointers can be compared to null' duration="{duration}"] ##teamcity[testStarted name='Precision of floating point stringification can be set'] diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 256e43fd99..071b3649b8 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -10474,6 +10474,123 @@ Nor would this + +
+ + + cli.parse({ "test", "--shard-count=8" }) + + + {?} + + + + + config.shardCount == 8 + + + 8 == 8 + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring("Shard count must be a positive number") + + + "Shard count must be a positive number" contains: "Shard count must be a positive number" + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring("Shard count must be a positive number") + + + "Shard count must be a positive number" contains: "Shard count must be a positive number" + + + +
+
+ + + cli.parse({ "test", "--shard-index=2" }) + + + {?} + + + + + config.shardIndex == 2 + + + 2 == 2 + + + +
+
+ + + !(result) + + + !{?} + + + + + result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number") + + + "Shard index must be a non-negative number" contains: "Shard index must be a non-negative number" + + + +
+
+ + + cli.parse({ "test", "--shard-index=0" }) + + + {?} + + + + + config.shardIndex == 0 + + + 0 == 0 + + + +
+ +
@@ -11469,72 +11586,6 @@ Nor would this -
-
- - - cli.parse({ "test", "--shard-count=8"}) - - - {?} - - - - - config.shardCount == 8 - - - 8 == 8 - - - -
- -
-
-
- - - cli.parse({ "test", "--shard-index=2"}) - - - {?} - - - - - config.shardIndex == 2 - - - 2 == 2 - - - -
- -
-
-
- - - !result - - - true - - - - - result.errorMessage(), ContainsSubstring( "The shard count must be greater than 0" ) - - - "The shard count must be greater than 0" contains: "The shard count must be greater than 0" - - - -
- -
@@ -20096,6 +20147,6 @@ loose text artifact - - + + diff --git a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index 5b58bdec14..332cbe5048 100644 --- a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -569,27 +569,53 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" REQUIRE(config.benchmarkWarmupTime == 10); } } +} - SECTION("Sharding options") { - SECTION("shard-count") { - CHECK(cli.parse({ "test", "--shard-count=8"})); +TEST_CASE("Parsing sharding-related cli flags", "[sharding]") { + using namespace Catch::Matchers; - REQUIRE(config.shardCount == 8); - } + Catch::ConfigData config; + auto cli = Catch::makeCommandLineParser(config); - SECTION("shard-index") { - CHECK(cli.parse({ "test", "--shard-index=2"})); + SECTION("shard-count") { + CHECK(cli.parse({ "test", "--shard-count=8" })); - REQUIRE(config.shardIndex == 2); - } + REQUIRE(config.shardCount == 8); + } - SECTION("Zero shard-count") { - auto result = cli.parse({ "test", "--shard-count=0"}); + SECTION("Negative shard count reports error") { + auto result = cli.parse({ "test", "--shard-count=-1" }); - CHECK( !result ); - CHECK_THAT( result.errorMessage(), ContainsSubstring( "The shard count must be greater than 0" ) ); - } + CHECK_FALSE(result); + REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Shard count must be a positive number")); + } + + SECTION("Zero shard count reports error") { + auto result = cli.parse({ "test", "--shard-count=0" }); + + CHECK_FALSE(result); + REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Shard count must be a positive number")); + } + + SECTION("shard-index") { + CHECK(cli.parse({ "test", "--shard-index=2" })); + + REQUIRE(config.shardIndex == 2); } + + SECTION("Negative shard index reports error") { + auto result = cli.parse({ "test", "--shard-index=-12" }); + + CHECK_FALSE(result); + REQUIRE_THAT(result.errorMessage(), ContainsSubstring("Shard index must be a non-negative number")); + } + + SECTION("Shard index 0 is accepted") { + CHECK(cli.parse({ "test", "--shard-index=0" })); + + REQUIRE(config.shardIndex == 0); + } + } TEST_CASE("Test with special, characters \"in name", "[cli][regression]") {