From 73b81ad1394e2512a47c6aa6c1f68385e098d7b2 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Wed, 5 Sep 2018 12:18:27 +0200 Subject: [PATCH] db/test: Check that junk before '@' fails w/ INST_IO It will actually parse, but later fail in dbCanSetLink(). --- src/ioc/db/test/dbBadLink.db | 5 +++++ src/ioc/db/test/dbPutLinkTest.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ioc/db/test/dbBadLink.db b/src/ioc/db/test/dbBadLink.db index 6c41e854b..b38d2ccef 100644 --- a/src/ioc/db/test/dbBadLink.db +++ b/src/ioc/db/test/dbBadLink.db @@ -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") +} diff --git a/src/ioc/db/test/dbPutLinkTest.c b/src/ioc/db/test/dbPutLinkTest.c index 8407ff5bf..bf7cd7ba0 100644 --- a/src/ioc/db/test/dbPutLinkTest.c +++ b/src/ioc/db/test/dbPutLinkTest.c @@ -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();