]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Tue, 27 Mar 2001 15:00:15 +0000 (15:00 +0000)
committerhades <hades>
Tue, 27 Mar 2001 15:00:15 +0000 (15:00 +0000)
allParam/test/blob/b_lowercase.c [new file with mode: 0644]
allParam/test/blob/b_lowercase.h [new file with mode: 0644]

diff --git a/allParam/test/blob/b_lowercase.c b/allParam/test/blob/b_lowercase.c
new file mode 100644 (file)
index 0000000..1d411d3
--- /dev/null
@@ -0,0 +1,53 @@
+#include <stdio.h>
+#include <string.h>
+
+#include <allParam.h>
+
+#include "b_lowercase.h"
+
+int b_lowercase(const char *testid, const Param *param) {
+       char *name = "tname";
+       char *idx = "tint";
+       char buf[256];
+       FILE *result;
+       FILE *store;
+       size_t size;
+       size_t bufsize;
+       int retVal;
+       int myRetVal;
+
+#ifdef VERBOSE
+       printf("%s : Param_getBlob: Lowercase input on correct statements.\n", testid);
+#endif
+
+       retVal = Param_getBlob(param, name, idx, &size, &result);
+       store = fopen("blob", "w+");
+       while(bufsize = fread(buf, 1, 256, result)) {
+               fwrite(buf, 1, bufsize, store);
+       }
+       fclose(result);
+       fclose(store);
+       if ((size == 16368) && (retVal == 0)) {
+               if (!system("diff blob BLOB")) {
+                       myRetVal = 0;
+                       printf("%s : Passed.\n", testid);
+               } else {
+#ifdef VERBOSE
+                       printf("%s : Failed. Files \"blob\" and \"BLOB\" differ.\n", testid);
+#else
+                       printf("%s : Failed.\n", testid);
+#endif
+                       myRetVal = -1;
+               }
+       } else {
+#ifdef VERBOSE
+               printf("%s : Failed. Size: %d, return Value: %d.\n", testid, size, retVal);
+               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
+#else
+               printf("%s : Failed.\n", testid);
+#endif
+               myRetVal = -1;
+       }
+       return myRetVal;
+}
+
diff --git a/allParam/test/blob/b_lowercase.h b/allParam/test/blob/b_lowercase.h
new file mode 100644 (file)
index 0000000..14d0a9a
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef I_LOWERCASE_H
+#define I_LOWERCASE_H
+
+#include <allParam.h>
+
+int b_lowercase(const char *, const Param *);
+
+#endif