Add --list-listeners option

This commit is contained in:
Martin Hořeňovský committed 2022-05-10 20:57:59 +02:00
1 parent ae475a3c19
commit 5a49285e9c
33 files changed
+220 -18

No files matched your search

@@ -84,6 +84,16 @@ TEST_CASE( "The default listing implementation write to provided stream",
ContainsSubstring( "fake test name"s ) &&
ContainsSubstring( "fakeTestTag"s ) );
}
SECTION( "Listing listeners" ) {
std::vector<Catch::ListenerDescription> listeners(
{ { "fakeListener"_catch_sr, "fake description" } } );
Catch::defaultListListeners( sstream.stream(), listeners );
auto listingString = sstream.str();
REQUIRE_THAT( listingString,
ContainsSubstring( "fakeListener"s ) &&
ContainsSubstring( "fake description"s ) );
}
}
TEST_CASE( "Reporter's write listings to provided stream", "[reporters]" ) {