Allow going up with ".." when in root
Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/176
Change-Id: I23797edf159d39efe4e58b1d7c560aa3c13117b3
diff --git a/tests/cd.cpp b/tests/cd.cpp
index f85593b..e0d6293 100644
--- a/tests/cd.cpp
+++ b/tests/cd.cpp
@@ -136,6 +136,19 @@
SECTION("moving up")
{
+ SECTION("moving up when already in root")
+ {
+ input = "cd ..";
+ expected.m_path.m_nodes.push_back(dataNode_(nodeup_()));
+ }
+
+ SECTION("moving up TWICE when already in root")
+ {
+ input = "cd ../..";
+ expected.m_path.m_nodes.push_back(dataNode_(nodeup_()));
+ expected.m_path.m_nodes.push_back(dataNode_(nodeup_()));
+ }
+
SECTION("example:a/..")
{
input = "cd example:a/..";