Fix dbConstLink to handle a long-string array properly

Added a new parser dbLSConvertJSON for long-string arrays.
New test checks that only the first string element is used.
This commit is contained in:
Andrew Johnson
2017-04-24 17:09:01 -05:00
parent 311ad57e93
commit da94b7a2e4
5 changed files with 99 additions and 23 deletions
+3 -1
View File
@@ -53,6 +53,8 @@ static void testLongStringInit()
testdbGetFieldEqual("longstr3.VAL", DBR_STRING, "!--------------------------------------");
}
testdbGetFieldEqual("longstr4.VAL", DBR_STRING, "One");
testIocShutdownOk();
testdbCleanup();
@@ -149,7 +151,7 @@ static void testPrintfInit()
MAIN(linkInitTest)
{
testPlan(30);
testPlan(31);
testLongStringInit();
testCalcInit();
testPrintfInit();
+4 -1
View File
@@ -1,4 +1,3 @@
record(lsi, "longstr1") {
field(SIZV, "100")
field(INP, ["!----------------------------------------------!"])
@@ -14,6 +13,10 @@ record(lsi, "longstr3") {
field(INP, {const: "!----------------------------------------------!"})
}
record(stringin, "longstr4") {
field(INP, ["One","Two","Three","Four"])
}
record(ai, "emptylink" ) {
field(INP, {calc: {expr:"0"}})
}