commit | b8bad062d6a234073c5371ae76dc03d5fd2087d9 | [log] [tgz] |
---|---|---|
author | Václav Kubernát <kubernat@cesnet.cz> | Thu Feb 04 00:02:45 2021 +0100 |
committer | Václav Kubernát <kubernat@cesnet.cz> | Fri Feb 05 17:14:53 2021 +0100 |
tree | e50a1c21b21616cace81b8806651112b8e852d17 | |
parent | 94bb7cf298b08789ca04f364d7f40d6cc6ba043d [diff] |
Fix set not ignoring whitespace Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/211 Change-Id: Ifc4e72c0c3b8ca4683cdcdf8262abfb1c58541b4
diff --git a/src/common_parsers.hpp b/src/common_parsers.hpp index 8da90a6..71aedb9 100644 --- a/src/common_parsers.hpp +++ b/src/common_parsers.hpp
@@ -32,7 +32,7 @@ ]; auto const space_separator_def = - x3::omit[x3::no_skip[x3::space]]; + x3::omit[x3::no_skip[+x3::space]]; template <typename CoerceTo> struct as_type {
diff --git a/tests/leaf_editing.cpp b/tests/leaf_editing.cpp index c1639b2..40ce08d 100644 --- a/tests/leaf_editing.cpp +++ b/tests/leaf_editing.cpp
@@ -139,6 +139,13 @@ expected.m_data = std::string("somedata"); } + SECTION("more spaces before value") + { + input = "set mod:leafString \"somedata\""; + expected.m_path.m_nodes.emplace_back(module_{"mod"}, leaf_("leafString")); + expected.m_data = std::string("somedata"); + } + SECTION("int8") { input = "set mod:leafInt8 2";