--- /dev/null
+#include <stdio.h>
+#include <string.h>
+
+#include <param.h>
+
+#include "test21.h"
+
+int test21(const char *testid, const Param *param) {
+ char *name = "crate_id";
+ char *idx = "herakles";
+ char *result[NUM1];
+ int i;
+ int rows;
+ int retVal;
+ int myRetVal;
+
+ for (i = 0 ; i < NUM1 ; i++) {
+ result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
+ }
+ printf("%s : Param_getStringArray: Request for a scalar value.\n", testid);
+
+ retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
+ if ((rows == 1) && result && (strcmp(result[0], "test0") == 0) && (retVal == 0)) {
+ myRetVal = 0;
+ printf("%s : Passed.\n", testid);
+ } else {
+ printf("%s : Failed. Rows: %d, result: \'%s\', return Value: %d.\n", testid, rows, result, retVal);
+ printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
+ myRetVal = -1;
+ }
+ for (i = 0 ; i < NUM1 ; i++) {
+ free(result[i]);
+ }
+ return myRetVal;
+}
+
--- /dev/null
+#include <stdio.h>
+#include <string.h>
+
+#include <param.h>
+
+#include "test22.h"
+
+int test22(const char *testid, const Param *param) {
+ char *name = "race0";
+ char *idx = "fefpgafile";
+ char result[PARAM_MAX_VALUE_LEN];
+ int rows;
+ int retVal;
+ int myRetVal;
+ int i;
+
+ printf("%s : Param_getString: Request for Array value.\n", testid);
+
+ retVal = Param_getString(param, name, idx, &rows, result);
+ if ((rows == 1) &&
+ result && (strcmp(result, "daq_cas/vme/race/conf/5frontend.rbt") == 0) &&
+ (retVal == 0)) {
+ myRetVal = 0;
+ printf("%s : Passed.\n", testid);
+ } else {
+ printf("%s : Failed. Rows: %d, result : \'%s\', return Value: %d.\n", testid, rows, result, retVal);
+ printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
+ myRetVal = -1;
+ }
+ return myRetVal;
+}
+