|
@@ -169,7 +169,7 @@ SCENARIO("Check auth unauthorized") {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- WHEN("The a private function is called") {
|
|
|
+ WHEN("A private function is called") {
|
|
|
|
|
|
ret = shellmatta_processData(handle, (char*)"private\r", 8);
|
|
|
CHECK(ret == SHELLMATTA_OK);
|
|
@@ -186,6 +186,22 @@ SCENARIO("Check auth unauthorized") {
|
|
|
REQUIRE_THAT(write_data, Catch::Matchers::Equals(dummyData));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ WHEN("Autocomplete is triggered") {
|
|
|
+
|
|
|
+ ret = shellmatta_processData(handle, (char*)"\t\t", 2);
|
|
|
+ CHECK(ret == SHELLMATTA_OK);
|
|
|
+
|
|
|
+ THEN("Only public commands are shown.") {
|
|
|
+
|
|
|
+ char *dummyData = (char*) "\r\n"
|
|
|
+ "help ? login li logout lo public p \r\n"
|
|
|
+ "shellmatta->";
|
|
|
+
|
|
|
+ CHECK(write_length == strlen(dummyData));
|
|
|
+ REQUIRE_THAT(write_data, Catch::Matchers::Equals(dummyData));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|