Split path_ into schemaPath_ and dataPath_

This change is necessary because different commands accept different
kinds of paths (for example "cd" only accepts a data path, on the other
hand "ls" doesn't care about data, so it accepts both). One option was to
create a new path struct for every command, but that could get quickly
out of control as new commands get added. The other option was define only
the data path and schema path and then change the commands' grammars, so
that they only accept the relevant paths, but in the end always return a
data path or a schema path.

Change-Id: I7668a446fbf674c7a5deae22d9aacdfb3da9b07e
diff --git a/tests/cd.cpp b/tests/cd.cpp
index ffa4bbf..85ea794 100644
--- a/tests/cd.cpp
+++ b/tests/cd.cpp
@@ -40,40 +40,40 @@
             SECTION("example:a")
             {
                 input = "cd example:a";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
             }
 
             SECTION("second:a")
             {
                 input = "cd second:a";
-                expected.m_path.m_nodes.push_back(node_(module_{"second"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"second"}, container_("a")));
             }
 
             SECTION("example:b")
             {
                 input = "cd example:b";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("b")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("b")));
             }
 
             SECTION("example:a/a2")
             {
                 input = "cd example:a/a2";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
-                expected.m_path.m_nodes.push_back(node_(container_("a2")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(container_("a2")));
             }
 
             SECTION("example:a/example:a2")
             {
                 input = "cd example:a/example:a2";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a2")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a2")));
             }
 
             SECTION("example:b/b2")
             {
                 input = "cd example:b/b2";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("b")));
-                expected.m_path.m_nodes.push_back(node_(container_("b2")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("b")));
+                expected.m_path.m_nodes.push_back(dataNode_(container_("b2")));
             }
         }
 
@@ -84,7 +84,7 @@
                 input = "cd example:list[number=1]";
                 auto keys = std::map<std::string, std::string>{
                     {"number", "1"}};
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, listElement_("list", keys)));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, listElement_("list", keys)));
             }
 
             SECTION("example:list[number=1]/contInList")
@@ -92,8 +92,8 @@
                 input = "cd example:list[number=1]/contInList";
                 auto keys = std::map<std::string, std::string>{
                     {"number", "1"}};
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, listElement_("list", keys)));
-                expected.m_path.m_nodes.push_back(node_(container_("contInList")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, listElement_("list", keys)));
+                expected.m_path.m_nodes.push_back(dataNode_(container_("contInList")));
             }
 
             SECTION("example:twoKeyList[number=4][name='abcd']")
@@ -102,7 +102,7 @@
                 auto keys = std::map<std::string, std::string>{
                     {"number", "4"},
                     {"name", "abcd"}};
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, listElement_("twoKeyList", keys)));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, listElement_("twoKeyList", keys)));
             }
         }
 
@@ -111,7 +111,7 @@
             SECTION("  cd   example:a     ")
             {
                 input = "  cd   example:a     ";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
             }
         }
 
@@ -120,25 +120,25 @@
             SECTION("example:a/..")
             {
                 input = "cd example:a/..";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
-                expected.m_path.m_nodes.push_back(node_(nodeup_()));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(nodeup_()));
             }
 
             SECTION("example:a/../example:a")
             {
                 input = "cd example:a/../example:a";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
-                expected.m_path.m_nodes.push_back(node_(nodeup_()));
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(nodeup_()));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
             }
 
             SECTION("example:a/../example:a/a2")
             {
                 input = "cd example:a/../example:a/a2";
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
-                expected.m_path.m_nodes.push_back(node_(nodeup_()));
-                expected.m_path.m_nodes.push_back(node_(module_{"example"}, container_("a")));
-                expected.m_path.m_nodes.push_back(node_(container_("a2")));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(nodeup_()));
+                expected.m_path.m_nodes.push_back(dataNode_(module_{"example"}, container_("a")));
+                expected.m_path.m_nodes.push_back(dataNode_(container_("a2")));
             }
         }