[libxml2] Don't run icu_parse_test if EUC-JP is unsupported



commit dc6d2a4987879a5d50b2239ae10d0bc0dc1dbf11
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Sep 4 17:13:29 2018 +0200

    Don't run icu_parse_test if EUC-JP is unsupported
    
    Closes: #25

 runtest.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/runtest.c b/runtest.c
index 605c1d1a..addda5ca 100644
--- a/runtest.c
+++ b/runtest.c
@@ -4413,9 +4413,10 @@ launchTests(testDescPtr tst) {
     char *result;
     char *error;
     int mem;
-    xmlCharEncodingHandlerPtr ebcdicHandler;
+    xmlCharEncodingHandlerPtr ebcdicHandler, eucJpHandler;
 
     ebcdicHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_EBCDIC);
+    eucJpHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_EUC_JP);
 
     if (tst == NULL) return(-1);
     if (tst->in != NULL) {
@@ -4426,8 +4427,10 @@ 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))
+            if (((ebcdicHandler == NULL) &&
+                 (strstr(globbuf.gl_pathv[i], "ebcdic") != NULL)) ||
+                ((eucJpHandler == NULL) &&
+                 (strstr(globbuf.gl_pathv[i], "icu_parse_test") != NULL)))
                 continue;
            if (tst->suffix != NULL) {
                result = resultFilename(globbuf.gl_pathv[i], tst->out,
@@ -4496,6 +4499,7 @@ launchTests(testDescPtr tst) {
     }
 
     xmlCharEncCloseFunc(ebcdicHandler);
+    xmlCharEncCloseFunc(eucJpHandler);
 
     return(err);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]