diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-10-31 17:17:16 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-11-04 15:25:30 +0100 |
commit | 4b4135977e82b7c9d3bba87a24fb7b5609312e14 (patch) | |
tree | aabd8debffebaa1b82b59444b8f4121596f6e232 /runtest.c | |
parent | f404c4f500a0ec18b04463581d5d1b3aae7f7730 (diff) | |
download | libxml2-4b4135977e82b7c9d3bba87a24fb7b5609312e14.tar.gz |
Skip EBCDIC tests if EBCDIC isn't supported
Fixes bug 603432.
Diffstat (limited to 'runtest.c')
-rw-r--r-- | runtest.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -26,6 +26,7 @@ #include <libxml/parserInternals.h> #include <libxml/tree.h> #include <libxml/uri.h> +#include <libxml/encoding.h> #ifdef LIBXML_OUTPUT_ENABLED #ifdef LIBXML_READER_ENABLED @@ -4412,6 +4413,9 @@ launchTests(testDescPtr tst) { char *result; char *error; int mem; + xmlCharEncodingHandlerPtr ebcdicHandler; + + ebcdicHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_EBCDIC); if (tst == NULL) return(-1); if (tst->in != NULL) { @@ -4422,6 +4426,9 @@ launchTests(testDescPtr tst) { for (i = 0;i < globbuf.gl_pathc;i++) { if (!checkTestFile(globbuf.gl_pathv[i])) continue; + if ((ebcdicHandler == NULL) && + (strstr(globbuf.gl_pathv[i], "ebcdic") != NULL)) + continue; if (tst->suffix != NULL) { result = resultFilename(globbuf.gl_pathv[i], tst->out, tst->suffix); @@ -4487,6 +4494,9 @@ launchTests(testDescPtr tst) { err++; } } + + xmlCharEncCloseFunc(ebcdicHandler); + return(err); } |