| 1093 | } |
| 1094 | |
| 1095 | struct 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 | |
| 1108 | TEST_CASE_METHOD(CapturedHelp, "Successful", "[help]") { |
| 1109 | CHECK(0 == run(CLI::Success())); |
nothing calls this directly
no outgoing calls
no test coverage detected