Skip to content

Commit

Permalink
test DB link modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavidsaver committed Nov 3, 2021
1 parent b07080b commit e309cd4
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion modules/database/test/ioc/db/dbPutLinkTest.c
Expand Up @@ -247,6 +247,32 @@ static void testCADBSet(void)
testdbCleanup();
}

static
void testDBMod(void)
{
testDiag("\n# Checking DB link modifier\n#");
testdbPrepare();

testdbReadDatabase("dbTestIoc.dbd", NULL, NULL);

dbTestIoc_registerRecordDeviceDriver(pdbbase);

testdbReadDatabase("dbPutLinkTest.db", NULL, NULL);

eltc(0);
testIocInitOk();
eltc(1);

testdbPutFieldOk("x1.INP", DBF_STRING, "x2 DB");
testdbGetFieldEqual("x1.INP", DBF_STRING, "x2 NPP NMS DB");
testdbPutFieldFail(S_dbLib_recNotFound, "x1.INP", DBF_STRING, "notrec DB");
testdbGetFieldEqual("x1.INP", DBF_STRING, "x2 NPP NMS DB");

testIocShutdownOk();

testdbCleanup();
}

typedef struct {
const char * const recname;
short ltype;
Expand Down Expand Up @@ -700,10 +726,11 @@ void testTSEL(void)

MAIN(dbPutLinkTest)
{
testPlan(342);
testPlan(346);
testLinkParse();
testLinkFailParse();
testCADBSet();
testDBMod();
testHWInitSet();
testHWMod();
testLinkInitFail();
Expand Down

0 comments on commit e309cd4

Please sign in to comment.