Tests for interactive selection input
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 27 Jun 2015 17:39:33 +0000 (20:39 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Sat, 4 Jul 2015 17:50:27 +0000 (20:50 +0300)
commitaa40ec1fd149313b4402c12dfc499da54abe68d3
tree47ec57fdd6ae01447039b0c8d40c64856d1b6203
parent180cf1538ad2b19bd6b4108662adc4a519565fcb
Tests for interactive selection input

Add InteractiveTestHelper to test interactive sessions that use streams
from textstream.h.  Use this to test the behavior of interactive
selection input.  Errors in the input or the help is not tested (yet),
and some corner cases may be missing, but most of the code is now
covered.  Separate set of tests is needed for SelectionOptionManager
prompts (will be added separately).

Remove obsolete special case handling from the interactive parser
(verified to not change any of the now tested behavior).

Change-Id: I448d470bcc240659a380ffa2d3b492949420c64b
27 files changed:
src/gromacs/analysisdata/tests/refdata/common-referencedata.xsl
src/gromacs/selection/selectioncollection.cpp
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesBasicInput.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesContinuation.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesEmptySelections.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesMultiSelectionInputStatus.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesMultipleSelectionsOnLine.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesNoFinalNewline.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesNoninteractiveInput.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesSingleSelectionInput.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesSingleSelectionInputNoninteractively.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesSingleSelectionInputStatus.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesStatusWithExistingSelections.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesStatusWithGroups.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesTwoSelectionInput.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/SelectionCollectionInteractiveTest_HandlesTwoSelectionInputStatus.xml [new file with mode: 0644]
src/gromacs/selection/tests/refdata/common-referencedata.xsl
src/gromacs/selection/tests/refdata/referencedata.xsl
src/gromacs/selection/tests/selectioncollection.cpp
src/gromacs/trajectoryanalysis/tests/refdata/common-referencedata.xsl
src/testutils/CMakeLists.txt
src/testutils/common-referencedata.xsl
src/testutils/interactivetest.cpp [new file with mode: 0644]
src/testutils/interactivetest.h [new file with mode: 0644]
src/testutils/tests/CMakeLists.txt
src/testutils/tests/interactivetest.cpp [new file with mode: 0644]
src/testutils/testutils-doc.h