diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-10-22 16:48:58 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-10-23 14:27:05 +0200 |
commit | ea7c9fb5dd4c0008ecbe897bc9072ba2373e5537 (patch) | |
tree | 7a7542e293edf8fda4ccb6e0dd9f3c0f24897e4c | |
parent | c99cde3f2150be596b2df8a288aa20a4416af71c (diff) | |
download | libxml2-ea7c9fb5dd4c0008ecbe897bc9072ba2373e5537.tar.gz |
xinclude: Don't create result doc for test with errors
-rw-r--r-- | result/XInclude/nodes3.xml | 5 | ||||
-rw-r--r-- | runtest.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/result/XInclude/nodes3.xml b/result/XInclude/nodes3.xml deleted file mode 100644 index 9ab20448..00000000 --- a/result/XInclude/nodes3.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0"?> -<x xmlns:xinclude="http://www.w3.org/2003/XInclude"> - <!-- Simple test of including a set of nodes from an XML document --> - <xinclude:include href="../ents/something.xml#xpointer(//p)"/> -</x> @@ -2102,7 +2102,10 @@ errParseTest(const char *filename, const char *result, const char *err, #ifdef LIBXML_XINCLUDE_ENABLED if (options & XML_PARSE_XINCLUDE) { doc = xmlReadFile(filename, NULL, options); - xmlXIncludeProcessFlags(doc, options); + if (xmlXIncludeProcessFlags(doc, options) < 0) { + xmlFreeDoc(doc); + doc = NULL; + } } else #endif { |