From dec894fcfe714d2a5e644beb570d9e3e97009fe5 Mon Sep 17 00:00:00 2001 From: sairajat Date: Sat, 11 Feb 2017 23:40:53 -0500 Subject: [PATCH] Added space at end --- tests/parameter_handler/parameter_handler_3_with_space.cc | 8 ++++++-- .../parameter_handler_3_with_space.output | 3 ++- .../prm/parameter_handler_3_with_space.prm | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 tests/parameter_handler/prm/parameter_handler_3_with_space.prm diff --git a/tests/parameter_handler/parameter_handler_3_with_space.cc b/tests/parameter_handler/parameter_handler_3_with_space.cc index f16ab06ff2..4cd7139174 100644 --- a/tests/parameter_handler/parameter_handler_3_with_space.cc +++ b/tests/parameter_handler/parameter_handler_3_with_space.cc @@ -34,10 +34,14 @@ int main () ParameterHandler prm; prm.enter_subsection ("Testing"); - prm.declare_entry ("string list", + prm.declare_entry ("string list1", "a", Patterns::List(Patterns::Selection(" a|b|c|d|e|f|g|h")), "docs 1"); + prm.declare_entry ("string list2", + "h", + Patterns::List(Patterns::Selection("a|b|c|d|e|f|g|h ")), + "docs 2"); prm.declare_entry ("int", "1", Patterns::Integer()); @@ -48,7 +52,7 @@ int main () prm.leave_subsection (); // read and then write parameters - prm.read_input(SOURCE_DIR "/prm/parameter_handler_3.prm"); + prm.read_input(SOURCE_DIR "/prm/parameter_handler_3_with_space.prm"); prm.print_parameters (logfile, ParameterHandler::Text); } catch (std::exception &exc) diff --git a/tests/parameter_handler/parameter_handler_3_with_space.output b/tests/parameter_handler/parameter_handler_3_with_space.output index cf97eae312..6c16d6cbc8 100644 --- a/tests/parameter_handler/parameter_handler_3_with_space.output +++ b/tests/parameter_handler/parameter_handler_3_with_space.output @@ -7,7 +7,8 @@ subsection Testing set int = 3 # default: 1 # docs 1 - set string list = a, b, c # default: a + set string list1 = a, b, c # default: a + set string list2 = h, b, c # default: h end diff --git a/tests/parameter_handler/prm/parameter_handler_3_with_space.prm b/tests/parameter_handler/prm/parameter_handler_3_with_space.prm new file mode 100644 index 0000000000..b1737805f4 --- /dev/null +++ b/tests/parameter_handler/prm/parameter_handler_3_with_space.prm @@ -0,0 +1,5 @@ +subsection Testing + set string list1 = a, b, c + set string list2 = h, b, c + set int = 3 +end -- 2.39.5