OLD | NEW |
1 /* | 1 /* |
2 * runtest.c: C program to run libxml2 regression tests without | 2 * runtest.c: C program to run libxml2 regression tests without |
3 * requiring make or Python, and reducing platform dependancies | 3 * requiring make or Python, and reducing platform dependancies |
4 * to a strict minimum. | 4 * to a strict minimum. |
5 * | 5 * |
6 * To compile on Unixes: | 6 * To compile on Unixes: |
7 * cc -o runtest `xml2-config --cflags` runtest.c `xml2-config --libs` -lpthread | 7 * cc -o runtest `xml2-config --cflags` runtest.c `xml2-config --libs` -lpthread |
8 * | 8 * |
9 * See Copyright for the status of this software. | 9 * See Copyright for the status of this software. |
10 * | 10 * |
11 * daniel@veillard.com | 11 * daniel@veillard.com |
12 */ | 12 */ |
13 | 13 |
14 #ifdef HAVE_CONFIG_H | |
15 #include "libxml.h" | 14 #include "libxml.h" |
16 #else | |
17 #include <stdio.h> | 15 #include <stdio.h> |
18 #endif | |
19 | 16 |
20 #if !defined(_WIN32) || defined(__CYGWIN__) | 17 #if !defined(_WIN32) || defined(__CYGWIN__) |
21 #include <unistd.h> | 18 #include <unistd.h> |
22 #endif | 19 #endif |
23 #include <string.h> | 20 #include <string.h> |
24 #include <sys/types.h> | 21 #include <sys/types.h> |
25 #include <sys/stat.h> | 22 #include <sys/stat.h> |
26 #include <fcntl.h> | 23 #include <fcntl.h> |
27 | 24 |
28 #include <libxml/parser.h> | 25 #include <libxml/parser.h> |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 static void globfree(glob_t *pglob) { | 184 static void globfree(glob_t *pglob) { |
188 unsigned int i; | 185 unsigned int i; |
189 if (pglob == NULL) | 186 if (pglob == NULL) |
190 return; | 187 return; |
191 | 188 |
192 for (i = 0;i < pglob->gl_pathc;i++) { | 189 for (i = 0;i < pglob->gl_pathc;i++) { |
193 if (pglob->gl_pathv[i] != NULL) | 190 if (pglob->gl_pathv[i] != NULL) |
194 free(pglob->gl_pathv[i]); | 191 free(pglob->gl_pathv[i]); |
195 } | 192 } |
196 } | 193 } |
197 #define vsnprintf _vsnprintf | 194 |
198 #define snprintf _snprintf | |
199 #else | 195 #else |
200 #include <glob.h> | 196 #include <glob.h> |
201 #endif | 197 #endif |
202 | 198 |
203 /************************************************************************ | 199 /************************************************************************ |
204 * * | 200 * * |
205 * Libxml2 specific routines * | 201 * Libxml2 specific routines * |
206 * * | 202 * * |
207 ************************************************************************/ | 203 ************************************************************************/ |
208 | 204 |
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 ret = 0; | 1672 ret = 0; |
1677 } else | 1673 } else |
1678 #endif | 1674 #endif |
1679 ret = xmlSAXUserParseFile(emptySAXHandler, NULL, filename); | 1675 ret = xmlSAXUserParseFile(emptySAXHandler, NULL, filename); |
1680 if (ret == XML_WAR_UNDECLARED_ENTITY) { | 1676 if (ret == XML_WAR_UNDECLARED_ENTITY) { |
1681 fprintf(SAXdebug, "xmlSAXUserParseFile returned error %d\n", ret); | 1677 fprintf(SAXdebug, "xmlSAXUserParseFile returned error %d\n", ret); |
1682 ret = 0; | 1678 ret = 0; |
1683 } | 1679 } |
1684 if (ret != 0) { | 1680 if (ret != 0) { |
1685 fprintf(stderr, "Failed to parse %s\n", filename); | 1681 fprintf(stderr, "Failed to parse %s\n", filename); |
1686 » return(1); | 1682 » ret = 1; |
| 1683 » goto done; |
1687 } | 1684 } |
1688 #ifdef LIBXML_HTML_ENABLED | 1685 #ifdef LIBXML_HTML_ENABLED |
1689 if (options & XML_PARSE_HTML) { | 1686 if (options & XML_PARSE_HTML) { |
1690 htmlSAXParseFile(filename, NULL, debugHTMLSAXHandler, NULL); | 1687 htmlSAXParseFile(filename, NULL, debugHTMLSAXHandler, NULL); |
1691 ret = 0; | 1688 ret = 0; |
1692 } else | 1689 } else |
1693 #endif | 1690 #endif |
1694 if (options & XML_PARSE_SAX1) { | 1691 if (options & XML_PARSE_SAX1) { |
1695 ret = xmlSAXUserParseFile(debugSAXHandler, NULL, filename); | 1692 ret = xmlSAXUserParseFile(debugSAXHandler, NULL, filename); |
1696 } else { | 1693 } else { |
1697 ret = xmlSAXUserParseFile(debugSAX2Handler, NULL, filename); | 1694 ret = xmlSAXUserParseFile(debugSAX2Handler, NULL, filename); |
1698 } | 1695 } |
1699 if (ret == XML_WAR_UNDECLARED_ENTITY) { | 1696 if (ret == XML_WAR_UNDECLARED_ENTITY) { |
1700 fprintf(SAXdebug, "xmlSAXUserParseFile returned error %d\n", ret); | 1697 fprintf(SAXdebug, "xmlSAXUserParseFile returned error %d\n", ret); |
1701 ret = 0; | 1698 ret = 0; |
1702 } | 1699 } |
1703 fclose(SAXdebug); | 1700 fclose(SAXdebug); |
1704 if (compareFiles(temp, result)) { | 1701 if (compareFiles(temp, result)) { |
1705 fprintf(stderr, "Got a difference for %s\n", filename); | 1702 fprintf(stderr, "Got a difference for %s\n", filename); |
1706 ret = 1; | 1703 ret = 1; |
1707 } | 1704 } |
| 1705 |
| 1706 done: |
1708 if (temp != NULL) { | 1707 if (temp != NULL) { |
1709 unlink(temp); | 1708 unlink(temp); |
1710 free(temp); | 1709 free(temp); |
1711 } | 1710 } |
1712 | 1711 |
1713 /* switch back to structured error handling */ | 1712 /* switch back to structured error handling */ |
1714 xmlSetGenericErrorFunc(NULL, NULL); | 1713 xmlSetGenericErrorFunc(NULL, NULL); |
1715 xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler); | 1714 xmlSetStructuredErrorFunc(NULL, testStructuredErrorHandler); |
1716 | 1715 |
1717 return(ret); | 1716 return(ret); |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 empty, | 2089 empty, |
2091 xmlTextReaderHasValue(reader)); | 2090 xmlTextReaderHasValue(reader)); |
2092 if (value == NULL) | 2091 if (value == NULL) |
2093 fprintf(out, "\n"); | 2092 fprintf(out, "\n"); |
2094 else { | 2093 else { |
2095 fprintf(out, " %s\n", value); | 2094 fprintf(out, " %s\n", value); |
2096 } | 2095 } |
2097 } | 2096 } |
2098 static int | 2097 static int |
2099 streamProcessTest(const char *filename, const char *result, const char *err, | 2098 streamProcessTest(const char *filename, const char *result, const char *err, |
2100 xmlTextReaderPtr reader, const char *rng) { | 2099 xmlTextReaderPtr reader, const char *rng, int options) { |
2101 int ret; | 2100 int ret; |
2102 char *temp = NULL; | 2101 char *temp = NULL; |
2103 FILE *t = NULL; | 2102 FILE *t = NULL; |
2104 | 2103 |
2105 if (reader == NULL) | 2104 if (reader == NULL) |
2106 return(-1); | 2105 return(-1); |
2107 | 2106 |
2108 nb_tests++; | 2107 nb_tests++; |
2109 if (result != NULL) { | 2108 if (result != NULL) { |
2110 temp = resultFilename(filename, "", ".res"); | 2109 temp = resultFilename(filename, "", ".res"); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 * | 2185 * |
2187 * Returns 0 in case of success, an error code otherwise | 2186 * Returns 0 in case of success, an error code otherwise |
2188 */ | 2187 */ |
2189 static int | 2188 static int |
2190 streamParseTest(const char *filename, const char *result, const char *err, | 2189 streamParseTest(const char *filename, const char *result, const char *err, |
2191 int options) { | 2190 int options) { |
2192 xmlTextReaderPtr reader; | 2191 xmlTextReaderPtr reader; |
2193 int ret; | 2192 int ret; |
2194 | 2193 |
2195 reader = xmlReaderForFile(filename, NULL, options); | 2194 reader = xmlReaderForFile(filename, NULL, options); |
2196 ret = streamProcessTest(filename, result, err, reader, NULL); | 2195 ret = streamProcessTest(filename, result, err, reader, NULL, options); |
2197 xmlFreeTextReader(reader); | 2196 xmlFreeTextReader(reader); |
2198 return(ret); | 2197 return(ret); |
2199 } | 2198 } |
2200 | 2199 |
2201 /** | 2200 /** |
2202 * walkerParseTest: | 2201 * walkerParseTest: |
2203 * @filename: the file to parse | 2202 * @filename: the file to parse |
2204 * @result: the file with expected result | 2203 * @result: the file with expected result |
2205 * @err: the file with error messages | 2204 * @err: the file with error messages |
2206 * | 2205 * |
2207 * Parse a file using the walker, i.e. a reader built from a atree. | 2206 * Parse a file using the walker, i.e. a reader built from a atree. |
2208 * | 2207 * |
2209 * Returns 0 in case of success, an error code otherwise | 2208 * Returns 0 in case of success, an error code otherwise |
2210 */ | 2209 */ |
2211 static int | 2210 static int |
2212 walkerParseTest(const char *filename, const char *result, const char *err, | 2211 walkerParseTest(const char *filename, const char *result, const char *err, |
2213 int options) { | 2212 int options) { |
2214 xmlDocPtr doc; | 2213 xmlDocPtr doc; |
2215 xmlTextReaderPtr reader; | 2214 xmlTextReaderPtr reader; |
2216 int ret; | 2215 int ret; |
2217 | 2216 |
2218 doc = xmlReadFile(filename, NULL, options); | 2217 doc = xmlReadFile(filename, NULL, options); |
2219 if (doc == NULL) { | 2218 if (doc == NULL) { |
2220 fprintf(stderr, "Failed to parse %s\n", filename); | 2219 fprintf(stderr, "Failed to parse %s\n", filename); |
2221 return(-1); | 2220 return(-1); |
2222 } | 2221 } |
2223 reader = xmlReaderWalker(doc); | 2222 reader = xmlReaderWalker(doc); |
2224 ret = streamProcessTest(filename, result, err, reader, NULL); | 2223 ret = streamProcessTest(filename, result, err, reader, NULL, options); |
2225 xmlFreeTextReader(reader); | 2224 xmlFreeTextReader(reader); |
2226 xmlFreeDoc(doc); | 2225 xmlFreeDoc(doc); |
2227 return(ret); | 2226 return(ret); |
2228 } | 2227 } |
2229 | 2228 |
2230 /** | 2229 /** |
2231 * streamMemParseTest: | 2230 * streamMemParseTest: |
2232 * @filename: the file to parse | 2231 * @filename: the file to parse |
2233 * @result: the file with expected result | 2232 * @result: the file with expected result |
2234 * @err: the file with error messages | 2233 * @err: the file with error messages |
(...skipping 11 matching lines...) Expand all Loading... |
2246 int size; | 2245 int size; |
2247 | 2246 |
2248 /* | 2247 /* |
2249 * load and parse the memory | 2248 * load and parse the memory |
2250 */ | 2249 */ |
2251 if (loadMem(filename, &base, &size) != 0) { | 2250 if (loadMem(filename, &base, &size) != 0) { |
2252 fprintf(stderr, "Failed to load %s\n", filename); | 2251 fprintf(stderr, "Failed to load %s\n", filename); |
2253 return(-1); | 2252 return(-1); |
2254 } | 2253 } |
2255 reader = xmlReaderForMemory(base, size, filename, NULL, options); | 2254 reader = xmlReaderForMemory(base, size, filename, NULL, options); |
2256 ret = streamProcessTest(filename, result, err, reader, NULL); | 2255 ret = streamProcessTest(filename, result, err, reader, NULL, options); |
2257 free((char *)base); | 2256 free((char *)base); |
2258 xmlFreeTextReader(reader); | 2257 xmlFreeTextReader(reader); |
2259 return(ret); | 2258 return(ret); |
2260 } | 2259 } |
2261 #endif | 2260 #endif |
2262 | 2261 |
2263 #ifdef LIBXML_XPATH_ENABLED | 2262 #ifdef LIBXML_XPATH_ENABLED |
2264 #ifdef LIBXML_DEBUG_ENABLED | 2263 #ifdef LIBXML_DEBUG_ENABLED |
2265 /************************************************************************ | 2264 /************************************************************************ |
2266 * * | 2265 * * |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2721 | 2720 |
2722 static int urip_success = 1; | 2721 static int urip_success = 1; |
2723 static int urip_current = 0; | 2722 static int urip_current = 0; |
2724 static const char *urip_testURLs[] = { | 2723 static const char *urip_testURLs[] = { |
2725 "urip://example.com/a b.html", | 2724 "urip://example.com/a b.html", |
2726 "urip://example.com/a%20b.html", | 2725 "urip://example.com/a%20b.html", |
2727 "file:///path/to/a b.html", | 2726 "file:///path/to/a b.html", |
2728 "file:///path/to/a%20b.html", | 2727 "file:///path/to/a%20b.html", |
2729 "/path/to/a b.html", | 2728 "/path/to/a b.html", |
2730 "/path/to/a%20b.html", | 2729 "/path/to/a%20b.html", |
2731 "urip://example.com/résumé.html", | 2730 "urip://example.com/r" "\xe9" "sum" "\xe9" ".html", |
2732 "urip://example.com/test?a=1&b=2%263&c=4#foo", | 2731 "urip://example.com/test?a=1&b=2%263&c=4#foo", |
2733 NULL | 2732 NULL |
2734 }; | 2733 }; |
2735 static const char *urip_rcvsURLs[] = { | 2734 static const char *urip_rcvsURLs[] = { |
2736 /* it is an URI the strings must be escaped */ | 2735 /* it is an URI the strings must be escaped */ |
2737 "urip://example.com/a%20b.html", | 2736 "urip://example.com/a%20b.html", |
2738 /* check that % escaping is not broken */ | 2737 /* check that % escaping is not broken */ |
2739 "urip://example.com/a%20b.html", | 2738 "urip://example.com/a%20b.html", |
2740 /* it's an URI path the strings must be escaped */ | 2739 /* it's an URI path the strings must be escaped */ |
2741 "file:///path/to/a%20b.html", | 2740 "file:///path/to/a%20b.html", |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3305 err[499] = 0; | 3304 err[499] = 0; |
3306 } else { | 3305 } else { |
3307 fprintf(stderr, "don't know how to process %s\n", instance); | 3306 fprintf(stderr, "don't know how to process %s\n", instance); |
3308 continue; | 3307 continue; |
3309 } | 3308 } |
3310 reader = xmlReaderForFile(instance, NULL, options); | 3309 reader = xmlReaderForFile(instance, NULL, options); |
3311 if (reader == NULL) { | 3310 if (reader == NULL) { |
3312 fprintf(stderr, "Failed to build reder for %s\n", instance); | 3311 fprintf(stderr, "Failed to build reder for %s\n", instance); |
3313 } | 3312 } |
3314 if (disable_err == 1) | 3313 if (disable_err == 1) |
3315 » ret = streamProcessTest(instance, result, NULL, reader, filename); | 3314 » ret = streamProcessTest(instance, result, NULL, reader, filename, |
| 3315 » options); |
3316 else | 3316 else |
3317 » ret = streamProcessTest(instance, result, err, reader, filename); | 3317 » ret = streamProcessTest(instance, result, err, reader, filename, |
| 3318 » options); |
3318 xmlFreeTextReader(reader); | 3319 xmlFreeTextReader(reader); |
3319 if (ret != 0) { | 3320 if (ret != 0) { |
3320 fprintf(stderr, "instance %s failed\n", instance); | 3321 fprintf(stderr, "instance %s failed\n", instance); |
3321 res = ret; | 3322 res = ret; |
3322 } | 3323 } |
3323 } | 3324 } |
3324 globfree(&globbuf); | 3325 globfree(&globbuf); |
3325 | 3326 |
3326 return(res); | 3327 return(res); |
3327 } | 3328 } |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3929 if (xmlGenericErrorContext != stderr) { | 3930 if (xmlGenericErrorContext != stderr) { |
3930 printf("xmlGenericErrorContext override failed\n"); | 3931 printf("xmlGenericErrorContext override failed\n"); |
3931 okay = 0; | 3932 okay = 0; |
3932 } | 3933 } |
3933 } | 3934 } |
3934 if (okay == 0) | 3935 if (okay == 0) |
3935 return ((void *) Failed); | 3936 return ((void *) Failed); |
3936 return ((void *) Okay); | 3937 return ((void *) Okay); |
3937 } | 3938 } |
3938 | 3939 |
3939 #if defined(linux) || defined(__sun) || defined(__APPLE_CC__) | 3940 #if defined WIN32 |
3940 | |
3941 #include <pthread.h> | |
3942 | |
3943 static pthread_t tid[MAX_ARGC]; | |
3944 | |
3945 static int | |
3946 testThread(void) | |
3947 { | |
3948 unsigned int i, repeat; | |
3949 unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]); | |
3950 void *results[MAX_ARGC]; | |
3951 int ret; | |
3952 int res = 0; | |
3953 | |
3954 xmlInitParser(); | |
3955 | |
3956 for (repeat = 0; repeat < 500; repeat++) { | |
3957 xmlLoadCatalog(catalog); | |
3958 nb_tests++; | |
3959 | |
3960 for (i = 0; i < num_threads; i++) { | |
3961 results[i] = NULL; | |
3962 tid[i] = (pthread_t) - 1; | |
3963 } | |
3964 | |
3965 for (i = 0; i < num_threads; i++) { | |
3966 ret = pthread_create(&tid[i], 0, thread_specific_data, | |
3967 (void *) testfiles[i]); | |
3968 if (ret != 0) { | |
3969 fprintf(stderr, "pthread_create failed\n"); | |
3970 return (1); | |
3971 } | |
3972 } | |
3973 for (i = 0; i < num_threads; i++) { | |
3974 ret = pthread_join(tid[i], &results[i]); | |
3975 if (ret != 0) { | |
3976 fprintf(stderr, "pthread_join failed\n"); | |
3977 return (1); | |
3978 } | |
3979 } | |
3980 | |
3981 xmlCatalogCleanup(); | |
3982 for (i = 0; i < num_threads; i++) | |
3983 if (results[i] != (void *) Okay) { | |
3984 fprintf(stderr, "Thread %d handling %s failed\n", | |
3985 i, testfiles[i]); | |
3986 res = 1; | |
3987 } | |
3988 } | |
3989 return (res); | |
3990 } | |
3991 | |
3992 #elif defined WIN32 | |
3993 #include <windows.h> | 3941 #include <windows.h> |
3994 #include <string.h> | 3942 #include <string.h> |
3995 | 3943 |
3996 #define TEST_REPEAT_COUNT 500 | 3944 #define TEST_REPEAT_COUNT 500 |
3997 | 3945 |
3998 static HANDLE tid[MAX_ARGC]; | 3946 static HANDLE tid[MAX_ARGC]; |
3999 | 3947 |
4000 static DWORD WINAPI | 3948 static DWORD WINAPI |
4001 win32_thread_specific_data(void *private_data) | 3949 win32_thread_specific_data(void *private_data) |
4002 { | 3950 { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4108 for (i = 0; i < num_threads; i++) | 4056 for (i = 0; i < num_threads; i++) |
4109 if (results[i] != (void *) Okay) { | 4057 if (results[i] != (void *) Okay) { |
4110 printf("Thread %d handling %s failed\n", i, testfiles[i]); | 4058 printf("Thread %d handling %s failed\n", i, testfiles[i]); |
4111 ret = B_ERROR; | 4059 ret = B_ERROR; |
4112 } | 4060 } |
4113 } | 4061 } |
4114 if (ret != B_OK) | 4062 if (ret != B_OK) |
4115 return(1); | 4063 return(1); |
4116 return (0); | 4064 return (0); |
4117 } | 4065 } |
| 4066 |
| 4067 #elif defined HAVE_PTHREAD_H |
| 4068 #include <pthread.h> |
| 4069 |
| 4070 static pthread_t tid[MAX_ARGC]; |
| 4071 |
| 4072 static int |
| 4073 testThread(void) |
| 4074 { |
| 4075 unsigned int i, repeat; |
| 4076 unsigned int num_threads = sizeof(testfiles) / sizeof(testfiles[0]); |
| 4077 void *results[MAX_ARGC]; |
| 4078 int ret; |
| 4079 int res = 0; |
| 4080 |
| 4081 xmlInitParser(); |
| 4082 |
| 4083 for (repeat = 0; repeat < 500; repeat++) { |
| 4084 xmlLoadCatalog(catalog); |
| 4085 nb_tests++; |
| 4086 |
| 4087 for (i = 0; i < num_threads; i++) { |
| 4088 results[i] = NULL; |
| 4089 tid[i] = (pthread_t) - 1; |
| 4090 } |
| 4091 |
| 4092 for (i = 0; i < num_threads; i++) { |
| 4093 ret = pthread_create(&tid[i], 0, thread_specific_data, |
| 4094 (void *) testfiles[i]); |
| 4095 if (ret != 0) { |
| 4096 fprintf(stderr, "pthread_create failed\n"); |
| 4097 return (1); |
| 4098 } |
| 4099 } |
| 4100 for (i = 0; i < num_threads; i++) { |
| 4101 ret = pthread_join(tid[i], &results[i]); |
| 4102 if (ret != 0) { |
| 4103 fprintf(stderr, "pthread_join failed\n"); |
| 4104 return (1); |
| 4105 } |
| 4106 } |
| 4107 |
| 4108 xmlCatalogCleanup(); |
| 4109 for (i = 0; i < num_threads; i++) |
| 4110 if (results[i] != (void *) Okay) { |
| 4111 fprintf(stderr, "Thread %d handling %s failed\n", |
| 4112 i, testfiles[i]); |
| 4113 res = 1; |
| 4114 } |
| 4115 } |
| 4116 return (res); |
| 4117 } |
| 4118 |
4118 #else | 4119 #else |
4119 static int | 4120 static int |
4120 testThread(void) | 4121 testThread(void) |
4121 { | 4122 { |
4122 fprintf(stderr, | 4123 fprintf(stderr, |
4123 "Specific platform thread support not detected\n"); | 4124 "Specific platform thread support not detected\n"); |
4124 return (-1); | 4125 return (-1); |
4125 } | 4126 } |
4126 #endif | 4127 #endif |
4127 static int | 4128 static int |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4200 XML_PARSE_HTML }, | 4201 XML_PARSE_HTML }, |
4201 #endif | 4202 #endif |
4202 #endif | 4203 #endif |
4203 #ifdef LIBXML_VALID_ENABLED | 4204 #ifdef LIBXML_VALID_ENABLED |
4204 { "Valid documents regression tests" , | 4205 { "Valid documents regression tests" , |
4205 errParseTest, "./test/VCM/*", NULL, NULL, NULL, | 4206 errParseTest, "./test/VCM/*", NULL, NULL, NULL, |
4206 XML_PARSE_DTDVALID }, | 4207 XML_PARSE_DTDVALID }, |
4207 { "Validity checking regression tests" , | 4208 { "Validity checking regression tests" , |
4208 errParseTest, "./test/VC/*", "result/VC/", NULL, "", | 4209 errParseTest, "./test/VC/*", "result/VC/", NULL, "", |
4209 XML_PARSE_DTDVALID }, | 4210 XML_PARSE_DTDVALID }, |
| 4211 #ifdef LIBXML_READER_ENABLED |
| 4212 { "Streaming validity checking regression tests" , |
| 4213 streamParseTest, "./test/valid/*.xml", "result/valid/", NULL, ".err.rdr", |
| 4214 XML_PARSE_DTDVALID }, |
| 4215 { "Streaming validity error checking regression tests" , |
| 4216 streamParseTest, "./test/VC/*", "result/VC/", NULL, ".rdr", |
| 4217 XML_PARSE_DTDVALID }, |
| 4218 #endif |
4210 { "General documents valid regression tests" , | 4219 { "General documents valid regression tests" , |
4211 errParseTest, "./test/valid/*", "result/valid/", "", ".err", | 4220 errParseTest, "./test/valid/*", "result/valid/", "", ".err", |
4212 XML_PARSE_DTDVALID }, | 4221 XML_PARSE_DTDVALID }, |
4213 #endif | 4222 #endif |
4214 #ifdef LIBXML_XINCLUDE_ENABLED | 4223 #ifdef LIBXML_XINCLUDE_ENABLED |
4215 { "XInclude regression tests" , | 4224 { "XInclude regression tests" , |
4216 errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", NULL, | 4225 errParseTest, "./test/XInclude/docs/*", "result/XInclude/", "", NULL, |
4217 /* Ignore errors at this point ".err", */ | 4226 /* Ignore errors at this point ".err", */ |
4218 XML_PARSE_XINCLUDE }, | 4227 XML_PARSE_XINCLUDE }, |
4219 #ifdef LIBXML_READER_ENABLED | 4228 #ifdef LIBXML_READER_ENABLED |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4462 return(ret); | 4471 return(ret); |
4463 } | 4472 } |
4464 | 4473 |
4465 #else /* ! LIBXML_OUTPUT_ENABLED */ | 4474 #else /* ! LIBXML_OUTPUT_ENABLED */ |
4466 int | 4475 int |
4467 main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { | 4476 main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { |
4468 fprintf(stderr, "runtest requires output to be enabled in libxml2\n"); | 4477 fprintf(stderr, "runtest requires output to be enabled in libxml2\n"); |
4469 return(1); | 4478 return(1); |
4470 } | 4479 } |
4471 #endif | 4480 #endif |
OLD | NEW |