diff options
author | Mike Hommey <glandium@debian.org> | 2006-01-06 18:28:17 +0100 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2006-01-06 18:28:17 +0100 |
commit | 0fd83af441e251fc23fc1af7959fd6ecfa105fe1 (patch) | |
tree | a2b35749a66abce02e6f07983ef50618d93bef58 /runtest.c | |
parent | 17049f05f9ef09b3dc2a9c5d1de3f21de7c03193 (diff) | |
download | libxml2-0fd83af441e251fc23fc1af7959fd6ecfa105fe1.tar.gz |
Load /tmp/tmp.U9vXwU/libxml2-2.6.23 intoupstream/2.6.23
local/libxml2/branches/upstream/current.
Diffstat (limited to 'runtest.c')
-rw-r--r-- | runtest.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -11,11 +11,16 @@ * daniel@veillard.com */ +#ifdef HAVE_CONFIG_H +#include "libxml.h" +#else +#include <stdio.h> +#endif + #if !defined(_WIN32) || defined(__CYGWIN__) #include <unistd.h> #endif #include <string.h> -#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -204,7 +209,6 @@ static void globfree(glob_t *pglob) { static int nb_tests = 0; static int nb_errors = 0; static int nb_leaks = 0; -static long libxmlMemoryAllocatedBase = 0; static int extraMemoryFromResolver = 0; static int @@ -536,7 +540,6 @@ initializeLibxml2(void) { xmlSchemaInitTypes(); xmlRelaxNGInitTypes(); #endif - libxmlMemoryAllocatedBase = xmlMemUsed(); } @@ -2926,14 +2929,15 @@ schemasOneTest(const char *sch, unlink(temp); free(temp); - if (err != NULL) { + if ((ret != 0) && (err != NULL)) { if (compareFileMem(err, testErrors, testErrorsSize)) { fprintf(stderr, "Error for %s on %s failed\n", filename, sch); ret = 1; + } else { + ret = 0; } } - xmlSchemaFreeValidCtxt(ctxt); xmlFreeDoc(doc); return(ret); @@ -3029,8 +3033,8 @@ schemasTest(const char *filename, nb_tests++; ret = schemasOneTest(filename, instance, result, err, options, schemas); - if (res != 0) - ret = res; + if (ret != 0) + res = ret; } } globfree(&globbuf); |