fix for multi_id and commands starting with h

This commit is contained in:
Erik Frojdh
2021-09-15 09:15:14 +02:00
parent a961eead24
commit 3100ca448e
2 changed files with 14 additions and 2 deletions

View File

@ -383,4 +383,14 @@ TEST_CASE("All stuff"){
REQUIRE(p.receiver_id()==2);
REQUIRE(p.multi_id() == 3);
REQUIRE(p.command() == "exptime");
}
TEST_CASE("Parse a command that has -h in it"){
CmdParser p;
p.Parse("1-hostname somepc");
REQUIRE(p.multi_id() == 1);
REQUIRE(p.command() == "hostname");
REQUIRE(p.arguments().size() == 1);
REQUIRE(p.arguments()[0]== "somepc");
}