Some tests for 'gmx help -export rst'
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 16 May 2015 04:16:04 +0000 (07:16 +0300)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 20 May 2015 08:10:15 +0000 (10:10 +0200)
commit125bb863956da2ddaa463c70c122d86da9f9e420
tree6a33e366367832dfe98b96d5850ad0e6cf8771a6
parent33619c65ba0771068aec24bbf194a78749abfcfb
Some tests for 'gmx help -export rst'

Add basic test that checks 'gmx help -export rst' for regression.
The mechanism also makes it easier to test additional work in this area.

Minor changes in the command-line module to support testing:
 - Make all output from 'gmx help -export' capturable with a new
   FileOutputRedirectorInterface interface.
 - Make it easier to mock a CommandLineOptionsModuleInterface

Change-Id: I58982b3de7e946c373ffb737ef994b4e527418bc
15 files changed:
src/gromacs/commandline/cmdlinehelpmodule.cpp
src/gromacs/commandline/cmdlinehelpmodule.h
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/commandline/cmdlinemodulemanager.h
src/gromacs/commandline/cmdlineoptionsmodule.cpp
src/gromacs/commandline/cmdlineoptionsmodule.h
src/gromacs/commandline/tests/cmdlinemodulemanager.cpp
src/gromacs/commandline/tests/refdata/CommandLineModuleManagerTest_ExportsHelp.xml [new file with mode: 0644]
src/gromacs/commandline/tests/refdata/CommandLineModuleManagerTest_RunsGeneralHelp.xml [new file with mode: 0644]
src/gromacs/utility/file.cpp
src/gromacs/utility/file.h
src/gromacs/utility/fileredirector.cpp [new file with mode: 0644]
src/gromacs/utility/fileredirector.h [new file with mode: 0644]
src/testutils/stringtest.cpp
src/testutils/stringtest.h