Fix `switch` parsing
There are actually two fixes: the first one is a direct fix to the
linked issue. The attribute of the rule for switch was wrong. I'm not
sure how I missed that, but OK, now we have tests.
The other bug:
For some reason, the completion generator prevented the symbol table
parser from running and the value inside the resulting switch_ was
undefined. Asserting the attribute of the completion generator seems to
solve the issue.
I thought this would have something to do with the fact that I'm using
single member fusion structs. However, the bug still persisted even when
converting them into non-fusion structs (as suggested in the first
issue).
At some point, all single-member fusion structs should be converted into
non-fusion structs, but because it doesn't solve my problem, I won't be
doing it now.
Issue: https://github.com/boostorg/spirit/issues/463
Issue: https://github.com/boostorg/spirit/issues/659
Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/218
Change-Id: I364b32b76741c198808cc2b3c5027913162d0703
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7880545..25ce39e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -348,6 +348,7 @@
target_link_libraries(test_path_utils path)
cli_test(keyvalue_completion)
cli_test(parser_rpc)
+ cli_test(misc_commands)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/init_datastore.bash.in
${CMAKE_CURRENT_BINARY_DIR}/init_datastore.bash @ONLY)