Fix describe path parsing
describe still had two different path alternatives even though anyPath
covers both.
Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/201
Change-Id: I19928e3540dc72e8c843ae87491bd1c6226483ba
diff --git a/src/grammars.hpp b/src/grammars.hpp
index 02da179..7cc8de6 100644
--- a/src/grammars.hpp
+++ b/src/grammars.hpp
@@ -137,7 +137,7 @@
copy_::name > space_separator > copy_args;
auto const describe_def =
- describe_::name >> space_separator > (dataPathListEnd | anyPath);
+ describe_::name >> space_separator > anyPath;
struct mode_table : x3::symbols<MoveMode> {
mode_table()
diff --git a/tests/path_completion.cpp b/tests/path_completion.cpp
index ffd3e93..6c7a8e6 100644
--- a/tests/path_completion.cpp
+++ b/tests/path_completion.cpp
@@ -205,6 +205,16 @@
}
}
+ SECTION("describe completion")
+ {
+ SECTION("path with list at the end")
+ {
+ input = "describe /example:list/";
+ expectedCompletions = {"contInList/", "number "};
+ expectedContextLength = 0;
+ }
+ }
+
SECTION("list keys completion")
{
SECTION("cd example:lis")