db/test: Check that junk before '@' fails w/ INST_IO

It will actually parse, but later fail in dbCanSetLink().
This commit is contained in:
Michael Davidsaver
2018-09-05 12:22:00 +02:00
parent 7c00cc8045
commit 73b81ad139
2 changed files with 13 additions and 1 deletions
+5
View File
@@ -14,3 +14,8 @@ record(x, "eINST_IO") {
field(DTYP, "Unit Test INST_IO")
field(INP, "hello")
}
record(x, "eINST_IO2") {
field(DTYP, "Unit Test INST_IO")
field(INP, "RL @no")
}
+8 -1
View File
@@ -485,6 +485,13 @@ static void testLinkInitFail(void)
testOk1(plink->type == INST_IO);
testOk1(plink->value.instio.string != NULL);
testdbGetFieldEqual("eINST_IO2.INP", DBR_STRING, "@");
prec = (xRecord *) testdbRecordPtr("eINST_IO2");
plink = &prec->inp;
testOk1(plink->type == INST_IO);
testOk1(plink->value.instio.string != NULL);
testIocShutdownOk();
testdbCleanup();
@@ -689,7 +696,7 @@ void testTSEL(void)
MAIN(dbPutLinkTest)
{
testPlan(334);
testPlan(337);
testLinkParse();
testLinkFailParse();
testCADBSet();