mirror of
				https://gitlab.gnome.org/GNOME/libxml2.git
				synced 2025-10-30 10:45:36 +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")); |     return(c14nCommonTest(filename, 0, XML_C14N_1_1, "1-1-without-comments")); | ||||||
| } | } | ||||||
| #endif | #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			* |  *			Catalog and threads test			* | ||||||
| @@ -3969,7 +3969,11 @@ thread_specific_data(void *private_data) | |||||||
|         xmlDoValidityCheckingDefaultValue = 1; |         xmlDoValidityCheckingDefaultValue = 1; | ||||||
|         xmlGenericErrorContext = stderr; |         xmlGenericErrorContext = stderr; | ||||||
|     } |     } | ||||||
|  | #ifdef LIBXML_SAX1_ENABLED | ||||||
|     myDoc = xmlParseFile(filename); |     myDoc = xmlParseFile(filename); | ||||||
|  | #else | ||||||
|  |     myDoc = xmlReadFile(filename, NULL, XML_WITH_CATALOG); | ||||||
|  | #endif | ||||||
|     if (myDoc) { |     if (myDoc) { | ||||||
|         xmlFreeDoc(myDoc); |         xmlFreeDoc(myDoc); | ||||||
|     } else { |     } else { | ||||||
| @@ -4369,7 +4373,7 @@ testDesc testDescriptions[] = { | |||||||
|       c14n11WithoutCommentTest, "./test/c14n/1-1-without-comments/*.xml", NULL, NULL, NULL, |       c14n11WithoutCommentTest, "./test/c14n/1-1-without-comments/*.xml", NULL, NULL, NULL, | ||||||
|       0 }, |       0 }, | ||||||
| #endif | #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" , |     { "Catalog and Threads regression tests" , | ||||||
|       threadsTest, NULL, NULL, NULL, NULL, |       threadsTest, NULL, NULL, NULL, NULL, | ||||||
|       0 }, |       0 }, | ||||||
|   | |||||||
| @@ -3,7 +3,7 @@ | |||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <stdio.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/globals.h> | ||||||
| #include <libxml/threads.h> | #include <libxml/threads.h> | ||||||
| #include <libxml/parser.h> | #include <libxml/parser.h> | ||||||
| @@ -61,7 +61,11 @@ thread_specific_data(void *private_data) | |||||||
|         xmlDoValidityCheckingDefaultValue = 1; |         xmlDoValidityCheckingDefaultValue = 1; | ||||||
|         xmlGenericErrorContext = stderr; |         xmlGenericErrorContext = stderr; | ||||||
|     } |     } | ||||||
|  | #ifdef LIBXML_SAX1_ENABLED | ||||||
|     myDoc = xmlParseFile(filename); |     myDoc = xmlParseFile(filename); | ||||||
|  | #else | ||||||
|  |     myDoc = xmlReadFile(filename, NULL, XML_WITH_CATALOG); | ||||||
|  | #endif | ||||||
|     if (myDoc) { |     if (myDoc) { | ||||||
|         xmlFreeDoc(myDoc); |         xmlFreeDoc(myDoc); | ||||||
|     } else { |     } else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user