From 886f6f4a2c9630abb2ec0dcf99a0b65ff907df7c Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Sun, 11 Feb 2018 17:14:45 -0800 Subject: [PATCH] Show doctest help if requested. --- src/command_line.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/command_line.cc b/src/command_line.cc index 3251564d..23c19d96 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -433,7 +433,9 @@ int main(int argc, char** argv) { if (HasOption(options, "-h") || HasOption(options, "--help")) { PrintHelp(); - return 0; + // Also emit doctest help if --test-unit is passed. + if (!HasOption(options, "--test-unit")) + return 0; } if (!HasOption(options, "--log-all-to-stderr"))