mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-31 21:50:33 +03:00
Support catalog and threads tests under --without-sax1
This commit is contained in:
@@ -3922,7 +3922,7 @@ c14n11WithoutCommentTest(const char *filename,
|
||||
return(c14nCommonTest(filename, 0, XML_C14N_1_1, "1-1-without-comments"));
|
||||
}
|
||||
#endif
|
||||
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined (LIBXML_SAX1_ENABLED)
|
||||
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED)
|
||||
/************************************************************************
|
||||
* *
|
||||
* Catalog and threads test *
|
||||
@@ -3969,7 +3969,11 @@ thread_specific_data(void *private_data)
|
||||
xmlDoValidityCheckingDefaultValue = 1;
|
||||
xmlGenericErrorContext = stderr;
|
||||
}
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
myDoc = xmlParseFile(filename);
|
||||
#else
|
||||
myDoc = xmlReadFile(filename, NULL, XML_WITH_CATALOG);
|
||||
#endif
|
||||
if (myDoc) {
|
||||
xmlFreeDoc(myDoc);
|
||||
} else {
|
||||
@@ -4369,7 +4373,7 @@ testDesc testDescriptions[] = {
|
||||
c14n11WithoutCommentTest, "./test/c14n/1-1-without-comments/*.xml", NULL, NULL, NULL,
|
||||
0 },
|
||||
#endif
|
||||
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_SAX1_ENABLED)
|
||||
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED)
|
||||
{ "Catalog and Threads regression tests" ,
|
||||
threadsTest, NULL, NULL, NULL, NULL,
|
||||
0 },
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED) && defined(LIBXML_SAX1_ENABLED)
|
||||
#if defined(LIBXML_THREAD_ENABLED) && defined(LIBXML_CATALOG_ENABLED)
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/threads.h>
|
||||
#include <libxml/parser.h>
|
||||
@@ -61,7 +61,11 @@ thread_specific_data(void *private_data)
|
||||
xmlDoValidityCheckingDefaultValue = 1;
|
||||
xmlGenericErrorContext = stderr;
|
||||
}
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
myDoc = xmlParseFile(filename);
|
||||
#else
|
||||
myDoc = xmlReadFile(filename, NULL, XML_WITH_CATALOG);
|
||||
#endif
|
||||
if (myDoc) {
|
||||
xmlFreeDoc(myDoc);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user