Resolve one TODO for command line help tests
[alexxy/gromacs.git] / src / testutils / testinit.cpp
index 4bfdd9e2030c690451170887d3bef209064bc609..0fd8d1100b1784407475280e25f382c6930a47f9 100644 (file)
@@ -138,12 +138,13 @@ class TestProgramContext : public ProgramContextInterface
 //! Prints the command-line options for the unit test binary.
 void printHelp(const Options &options)
 {
+    const std::string &program = getProgramContext().displayName();
     std::fprintf(stderr,
                  "\nYou can use the following GROMACS-specific command-line flags\n"
                  "to control the behavior of the tests:\n\n");
     CommandLineHelpContext context(&File::standardError(),
-                                   eHelpOutputFormat_Console, NULL);
-    context.setModuleDisplayName(getProgramContext().displayName());
+                                   eHelpOutputFormat_Console, NULL, program);
+    context.setModuleDisplayName(program);
     CommandLineHelpWriter(options).writeHelp(context);
 }