Separate tab completion of the initial [ for lists
US: https://tree.taiga.io/project/jktjkt-netconf-cli/us/144
Change-Id: I03ffc2830c62bbf833fb1075e2dbead55b0ca838
diff --git a/tests/path_completion.cpp b/tests/path_completion.cpp
index 1550326..0715639 100644
--- a/tests/path_completion.cpp
+++ b/tests/path_completion.cpp
@@ -66,14 +66,14 @@
SECTION("ls ")
{
input = "ls ";
- expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list[", "example:ovoce[", "example:ovocezelenina[", "example:twoKeyList[", "second:amelie/"};
+ expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list", "example:ovoce", "example:ovocezelenina", "example:twoKeyList", "second:amelie/"};
expectedContextLength = 0;
}
SECTION("ls e")
{
input = "ls e";
- expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list[", "example:ovoce[", "example:ovocezelenina[", "example:twoKeyList["};
+ expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list", "example:ovoce", "example:ovocezelenina", "example:twoKeyList"};
expectedContextLength = 1;
}
@@ -101,14 +101,14 @@
SECTION("ls /")
{
input = "ls /";
- expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list[", "example:ovoce[", "example:ovocezelenina[", "example:twoKeyList[", "second:amelie/"};
+ expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list", "example:ovoce", "example:ovocezelenina", "example:twoKeyList", "second:amelie/"};
expectedContextLength = 0;
}
SECTION("ls /e")
{
input = "ls /e";
- expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list[", "example:ovoce[", "example:ovocezelenina[", "example:twoKeyList["};
+ expectedCompletions = {"example:ano/", "example:anoda/", "example:bota/", "example:leafInt ", "example:list", "example:ovoce", "example:ovocezelenina", "example:twoKeyList"};
expectedContextLength = 1;
}
@@ -160,7 +160,7 @@
SECTION("cd example:lis")
{
input = "cd example:lis";
- expectedCompletions = {"example:list["};
+ expectedCompletions = {"example:list"};
expectedContextLength = 11;
}
@@ -272,9 +272,23 @@
SECTION("cd example:ovoce")
{
input = "cd example:ovoce";
- expectedCompletions = {"example:ovoce[", "example:ovocezelenina["};
+ expectedCompletions = {"example:ovoce", "example:ovocezelenina"};
expectedContextLength = 13;
}
+
+ SECTION("cd example:ovoceze")
+ {
+ input = "cd example:ovoceze";
+ expectedCompletions = {"example:ovocezelenina"};
+ expectedContextLength = 15;
+ }
+
+ SECTION("cd example:ovocezelenina")
+ {
+ input = "cd example:ovocezelenina";
+ expectedCompletions = {"example:ovocezelenina["};
+ expectedContextLength = 21;
+ }
}
SECTION("clear completions when no longer inputting path")