MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / CapturedHelp

Class CapturedHelp

tests/HelpTest.cpp:1095–1106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1093}
1094
1095struct CapturedHelp {
1096 CLI::App app{"My Test Program"};
1097 std::stringstream out{};
1098 std::stringstream err{};
1099
1100 int run(const CLI::Error &e) { return app.exit(e, out, err); }
1101
1102 void reset() {
1103 out.clear();
1104 err.clear();
1105 }
1106};
1107
1108TEST_CASE_METHOD(CapturedHelp, "Successful", "[help]") {
1109 CHECK(0 == run(CLI::Success()));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected