additional tests

This commit is contained in:
Erik Frojdh 2021-09-15 09:25:36 +02:00
parent 3100ca448e
commit 671bc62740

View File

@ -393,4 +393,20 @@ TEST_CASE("Parse a command that has -h in it"){
REQUIRE(p.arguments().size() == 1);
REQUIRE(p.arguments()[0]== "somepc");
}
TEST_CASE("Parse a command in the form 0-1 command"){
CmdParser p;
p.Parse("3-5 exptime");
REQUIRE(p.multi_id() == 3);
REQUIRE(p.detector_id() == 5);
REQUIRE(p.command() == "exptime");
}
TEST_CASE("Parse a command in the form 0-1:command"){
CmdParser p;
p.Parse("3-5:exptime");
REQUIRE(p.multi_id() == 3);
REQUIRE(p.detector_id() == 5);
REQUIRE(p.command() == "exptime");
}