Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write line identifying Catch2 test interface in --help output of test builds #4363

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "util/types.h"
#include "work/WorkScheduler.h"

#include <catch.hpp>
#include <cereal/archives/json.hpp>
#include <cereal/cereal.hpp>

Expand Down Expand Up @@ -686,6 +687,12 @@ CommandLine::selectCommand(std::string const& commandName)
void
CommandLine::writeToStream(std::string const& exeName, std::ostream& os) const
{
#ifdef BUILD_TESTS
// Printing this line enables automatic test discovery in VSCode, and
// it is generally harmless otherwise (only shown in a BUILD_TESTS build).
std::cout << "Catch2 v" << CATCH_VERSION_MAJOR << "." << CATCH_VERSION_MINOR
<< "." << CATCH_VERSION_PATCH << std::endl;
#endif
os << "usage:\n"
<< " " << exeName << " "
<< "COMMAND";
Expand Down
Loading