From: hades Date: Tue, 27 Mar 2001 15:00:15 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=7243720a7cb476e0966b6ff2be6703a2f5521c09;p=daqdata.git *** empty log message *** --- diff --git a/allParam/test/blob/b_lowercase.c b/allParam/test/blob/b_lowercase.c new file mode 100644 index 0000000..1d411d3 --- /dev/null +++ b/allParam/test/blob/b_lowercase.c @@ -0,0 +1,53 @@ +#include +#include + +#include + +#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 index 0000000..14d0a9a --- /dev/null +++ b/allParam/test/blob/b_lowercase.h @@ -0,0 +1,8 @@ +#ifndef I_LOWERCASE_H +#define I_LOWERCASE_H + +#include + +int b_lowercase(const char *, const Param *); + +#endif