summaryrefslogtreecommitdiff
path: root/runsuite.c
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2012-09-18 01:15:22 +0800
committerAron Xu <aron@debian.org>2012-09-18 01:15:22 +0800
commitf660f9d2924c7549bc87e7f9b4ece7c9727b3682 (patch)
tree816b3ef0e89d1601803b5dc1b90b50ade0567043 /runsuite.c
parentd7372d053bbd1d58216fbb04d1771ffa4cc3e624 (diff)
downloadlibxml2-f660f9d2924c7549bc87e7f9b4ece7c9727b3682.tar.gz
Imported Upstream version 2.9.0upstream/2.9.0
Diffstat (limited to 'runsuite.c')
-rw-r--r--runsuite.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/runsuite.c b/runsuite.c
index d1dc2ca..aaab13e 100644
--- a/runsuite.c
+++ b/runsuite.c
@@ -1,16 +1,13 @@
/*
- * runsuite.c: C program to run libxml2 againts published testsuites
+ * runsuite.c: C program to run libxml2 againts published testsuites
*
* See Copyright for the status of this software.
*
* daniel@veillard.com
*/
-#ifdef HAVE_CONFIG_H
#include "libxml.h"
-#else
#include <stdio.h>
-#endif
#if !defined(_WIN32) || defined(__CYGWIN__)
#include <unistd.h>
@@ -38,10 +35,6 @@
static FILE *logfile = NULL;
static int verbose = 0;
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-#define vsnprintf _vsnprintf
-#define snprintf _snprintf
-#endif
/************************************************************************
* *
@@ -130,7 +123,7 @@ static int addEntity(char *name, char *content) {
* which is shared to the current running test. We also don't want to have
* network downloads modifying tests.
*/
-static xmlParserInputPtr
+static xmlParserInputPtr
testExternalEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt) {
xmlParserInputPtr ret;
@@ -159,7 +152,7 @@ testExternalEntityLoader(const char *URL, const char *ID,
fprintf(stderr, "Failed to find resource %s\n", URL);
}
#endif
-
+
return(ret);
}
@@ -422,7 +415,7 @@ installDirs(xmlNodePtr tst, const xmlChar *base) {
xmlFree(res);
}
-static int
+static int
xsdTestCase(xmlNodePtr tst) {
xmlNodePtr test, tmp, cur;
xmlBufferPtr buf;
@@ -449,7 +442,7 @@ xsdTestCase(xmlNodePtr tst) {
if (cur == NULL) {
return(xsdIncorectTestCase(tst));
}
-
+
test = getNext(cur, "./*");
if (test == NULL) {
fprintf(stderr, "Failed to find test in correct line %ld\n",
@@ -495,7 +488,7 @@ xsdTestCase(xmlNodePtr tst) {
if (test == NULL) {
fprintf(stderr, "Failed to find test in <valid> line %ld\n",
xmlGetLineNo(tmp));
-
+
} else {
xmlBufferEmpty(buf);
if (dtd != NULL)
@@ -554,7 +547,7 @@ xsdTestCase(xmlNodePtr tst) {
if (test == NULL) {
fprintf(stderr, "Failed to find test in <invalid> line %ld\n",
xmlGetLineNo(tmp));
-
+
} else {
xmlBufferEmpty(buf);
xmlNodeDump(buf, test->doc, test, 0, 0);
@@ -615,7 +608,7 @@ done:
return(ret);
}
-static int
+static int
xsdTestSuite(xmlNodePtr cur) {
if (verbose) {
xmlChar *doc = getString(cur, "string(documentation)");
@@ -630,11 +623,11 @@ xsdTestSuite(xmlNodePtr cur) {
xsdTestCase(cur);
cur = getNext(cur, "following-sibling::testCase[1]");
}
-
+
return(0);
}
-static int
+static int
xsdTest(void) {
xmlDocPtr doc;
xmlNodePtr cur;
@@ -672,7 +665,7 @@ done:
return(ret);
}
-static int
+static int
rngTestSuite(xmlNodePtr cur) {
if (verbose) {
xmlChar *doc = getString(cur, "string(documentation)");
@@ -693,11 +686,11 @@ rngTestSuite(xmlNodePtr cur) {
xsdTestSuite(cur);
cur = getNext(cur, "following-sibling::testSuite[1]");
}
-
+
return(0);
}
-static int
+static int
rngTest1(void) {
xmlDocPtr doc;
xmlNodePtr cur;
@@ -735,7 +728,7 @@ done:
return(ret);
}
-static int
+static int
rngTest2(void) {
xmlDocPtr doc;
xmlNodePtr cur;
@@ -945,7 +938,7 @@ xstcTestGroup(xmlNodePtr cur, const char *base) {
instance = getNext(cur, "./ts:instanceTest[1]");
while (instance != NULL) {
if (schemas != NULL) {
- xstcTestInstance(instance, schemas, path, base);
+ xstcTestInstance(instance, schemas, path, base);
} else {
/*
* We'll automatically mark the instances as failed