Tests for grompp -f -po
This requires slight refactoring so that when testing we can avoid
writing the header. The header has useful things embedded in it (date,
user name, etc.) but those are not reproducible in a test. All the old
callers of write_inpfile now pass a value that triggers the same
behaviour they used to have, of writing the helpful header. The new
testcase fixture avoids writing that header.
It would be preferable not to write files during testing, which will
be possible with some follow-up changes permit read_inpfile and
write_inputfile to use text stream interfaces.
A bug in the handling of mdp reading and handling was exposed and is
fixed. The use of inp_count is poorly designed, and does not work in
the edge case where there are no keys in the input file. Touching an
empty file to give to grompp for it to fill is something that people
actually do to get a full mdp file to edit, so we should make it work
soundly.
Fixes #2074
Change-Id: Ibd3901d39333eb601e716430dec65f0c290af858
15 files changed: