Consistent TextWriter trailing whitespace handling
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 11 Mar 2017 08:06:11 +0000 (10:06 +0200)
committerDavid van der Spoel <davidvanderspoel@gmail.com>
Sun, 12 Mar 2017 10:37:59 +0000 (11:37 +0100)
commit6910b30ab823bccece7035e39b9cefe42a9da868
tree524ffb581375a9c60f52909c8915bdec111dded1
parentf4dd51d87148916a95e7e2e1eb4f04933a324025
Consistent TextWriter trailing whitespace handling

Depending on how exactly the writer was called, trailing whitespace in
the input strings was either preserved or removed.  Now it behaves at
least more predictably.  Add tests.

The actual change is in the line wrapper.

Change-Id: I44d545cac53bc2c3aef363ec259ec82cbd1aec90
src/gromacs/utility/stringutil.cpp
src/gromacs/utility/tests/refdata/TextLineWrapperTest_WrapsCorrectlyWithExtraWhitespace.xml
src/gromacs/utility/tests/refdata/TextWriterTest_PreservesTrailingWhitespace.xml [new file with mode: 0644]
src/gromacs/utility/tests/stringutil.cpp
src/gromacs/utility/tests/textwriter.cpp