using gmx::test::CommandLine;
using gmx::test::ConfMatch;
+using gmx::test::ExactTextMatch;
class SolvateTest : public gmx::test::CommandLineTestBase
{
runTest(CommandLine(cmdline));
}
+TEST_F(SolvateTest, update_Topology_Works)
+{
+ // use solvent box with 2 solvents, check that topology has been updated
+ const char *const cmdline[] = {
+ "solvate"
+ };
+ setInputFile("-cs", "mixed_solvent.gro");
+ setInputFile("-cp", "simple.gro");
+
+ // TODO: Consider adding a convenience method for this.
+ // Copies topology file to where it would be found as an output file, so the copied
+ // .top file is used as both input and output
+ std::string topFileName = gmx::test::TestFileManager::getInputFilePath("simple.top");
+ std::string modifiableTopFileName = fileManager().getTemporaryFilePath("simple.top");
+ gmx_file_copy(topFileName.c_str(), modifiableTopFileName.c_str(), true);
+ setOutputFile("-p", "simple.top", ExactTextMatch());
+
+ runTest(CommandLine(cmdline));
+}
+
} // namespace