Synchronize with trunk r58457.
[reactos.git] / lib / 3rdparty / libxml2 / testapi.c
index df14820..48656b3 100644 (file)
@@ -8,20 +8,14 @@
  * daniel@veillard.com
  */
 
-#ifdef HAVE_CONFIG_H
 #include "libxml.h"
-#else
 #include <stdio.h>
-#endif
 
 #include <stdlib.h> /* for putenv() */
 #include <string.h>
 #include <libxml/xmlerror.h>
 #include <libxml/relaxng.h>
 
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#define snprintf _snprintf
-#endif
 
 static int testlibxml2(void);
 static int test_module(const char *module);
@@ -107,7 +101,7 @@ get_api_attr(void) {
     if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {
         get_api_root();
     }
-    if (api_root == NULL) 
+    if (api_root == NULL)
         return(NULL);
     if (api_root->properties != NULL) {
         api_attr = api_root->properties;
@@ -127,8 +121,10 @@ int main(int argc, char **argv) {
     int ret;
     int blocks, mem;
 
+#ifdef HAVE_PUTENV
     /* access to the proxy can slow up regression tests a lot */
     putenv((char *) "http_proxy=");
+#endif
 
     memset(chartab, 0, sizeof(chartab));
     strncpy((char *) chartab, "  chartab\n", 20);
@@ -201,7 +197,7 @@ int main(int argc, char **argv) {
 #include <libxml/xpointer.h>
 #include <libxml/debugXML.h>
 
-/* 
+/*
   We manually define xmlErrMemory because it's normal declaration
   is "hidden" by #ifdef IN_LIBXML
 */
@@ -291,7 +287,7 @@ static void des_long(int no ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED, int nr
 static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
     if (no == 0) return('a');
     if (no == 1) return(' ');
-    if (no == 2) return((xmlChar) 'ø');
+    if (no == 2) return((xmlChar) '\xf8');
     return(0);
 }
 
@@ -399,7 +395,7 @@ static void des_debug_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIB
 static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {
     if (no == 0) return((xmlChar *) "foo");
     if (no == 1) return((xmlChar *) "<foo/>");
-    if (no == 2) return((xmlChar *) "nøne");
+    if (no == 2) return((xmlChar *) "n" "\xf8" "ne");
     if (no == 3) return((xmlChar *) " 2ab ");
     return(NULL);
 }
@@ -543,7 +539,7 @@ static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {
 
 #define gen_nb_xmlDtdPtr 3
 static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {
-    if (no == 0) 
+    if (no == 0)
         return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));
     if (no == 1) return(get_api_dtd());
     return(NULL);
@@ -599,7 +595,7 @@ static void des_xmlTextReaderPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderPtr val,
 #endif
 
 #define gen_nb_xmlBufferPtr 3
-static const char *static_buf_content = "a static buffer";
+static const xmlChar *static_buf_content = (xmlChar *)"a static buffer";
 static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {
     if (no == 0) return(xmlBufferCreate());
     if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));
@@ -740,7 +736,7 @@ static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtx
 #endif /* LIBXML_SCHEMAS_ENABLED */
 
 #define gen_nb_xmlHashDeallocator 2
-static void 
+static void
 test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED) {
 }
 
@@ -1040,8 +1036,8 @@ static void des_xmlAttributeType(int no ATTRIBUTE_UNUSED, xmlAttributeType val A
 static xmlBufferAllocationScheme gen_xmlBufferAllocationScheme(int no, int nr ATTRIBUTE_UNUSED) {
     if (no == 1) return(XML_BUFFER_ALLOC_DOUBLEIT);
     if (no == 2) return(XML_BUFFER_ALLOC_EXACT);
-    if (no == 3) return(XML_BUFFER_ALLOC_IMMUTABLE);
-    if (no == 4) return(XML_BUFFER_ALLOC_IO);
+    if (no == 3) return(XML_BUFFER_ALLOC_HYBRID);
+    if (no == 4) return(XML_BUFFER_ALLOC_IMMUTABLE);
     return(0);
 }
 
@@ -8251,6 +8247,16 @@ test_xmlDictExists(void) {
 }
 
 
+static int
+test_xmlDictGetUsage(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
 static int
 test_xmlDictLookup(void) {
     int test_ret = 0;
@@ -8415,6 +8421,16 @@ test_xmlDictReference(void) {
 }
 
 
+static int
+test_xmlDictSetLimit(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
 static int
 test_xmlDictSize(void) {
     int test_ret = 0;
@@ -8446,20 +8462,48 @@ test_xmlDictSize(void) {
     return(test_ret);
 }
 
+
+static int
+test_xmlInitializeDict(void) {
+    int test_ret = 0;
+
+    int mem_base;
+    int ret_val;
+
+        mem_base = xmlMemBlocks();
+
+        ret_val = xmlInitializeDict();
+        desret_int(ret_val);
+        call_tests++;
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlInitializeDict",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf("\n");
+        }
+    function_tests++;
+
+    return(test_ret);
+}
+
 static int
 test_dict(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing dict : 9 of 10 functions ...\n");
+    if (quiet == 0) printf("Testing dict : 10 of 13 functions ...\n");
     test_ret += test_xmlDictCleanup();
     test_ret += test_xmlDictCreate();
     test_ret += test_xmlDictCreateSub();
     test_ret += test_xmlDictExists();
+    test_ret += test_xmlDictGetUsage();
     test_ret += test_xmlDictLookup();
     test_ret += test_xmlDictOwns();
     test_ret += test_xmlDictQLookup();
     test_ret += test_xmlDictReference();
+    test_ret += test_xmlDictSetLimit();
     test_ret += test_xmlDictSize();
+    test_ret += test_xmlInitializeDict();
 
     if (test_ret != 0)
        printf("Module dict: %d errors\n", test_ret);
@@ -18359,6 +18403,153 @@ test_xmlAttrSerializeTxtContent(void) {
 }
 
 
+#define gen_nb_const_xmlBufPtr 1
+static xmlBufPtr gen_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+    return(NULL);
+}
+static void des_const_xmlBufPtr(int no ATTRIBUTE_UNUSED, const xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufContent(void) {
+    int test_ret = 0;
+
+    int mem_base;
+    xmlChar * ret_val;
+    xmlBufPtr buf; /* the buffer */
+    int n_buf;
+
+    for (n_buf = 0;n_buf < gen_nb_const_xmlBufPtr;n_buf++) {
+        mem_base = xmlMemBlocks();
+        buf = gen_const_xmlBufPtr(n_buf, 0);
+
+        ret_val = xmlBufContent((const xmlBufPtr)buf);
+        desret_xmlChar_ptr(ret_val);
+        call_tests++;
+        des_const_xmlBufPtr(n_buf, (const xmlBufPtr)buf, 0);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlBufContent",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_buf);
+            printf("\n");
+        }
+    }
+    function_tests++;
+
+    return(test_ret);
+}
+
+
+static int
+test_xmlBufEnd(void) {
+    int test_ret = 0;
+
+    int mem_base;
+    xmlChar * ret_val;
+    xmlBufPtr buf; /* the buffer */
+    int n_buf;
+
+    for (n_buf = 0;n_buf < gen_nb_const_xmlBufPtr;n_buf++) {
+        mem_base = xmlMemBlocks();
+        buf = gen_const_xmlBufPtr(n_buf, 0);
+
+        ret_val = xmlBufEnd((const xmlBufPtr)buf);
+        desret_xmlChar_ptr(ret_val);
+        call_tests++;
+        des_const_xmlBufPtr(n_buf, (const xmlBufPtr)buf, 0);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlBufEnd",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_buf);
+            printf("\n");
+        }
+    }
+    function_tests++;
+
+    return(test_ret);
+}
+
+
+#define gen_nb_xmlBufPtr 1
+static xmlBufPtr gen_xmlBufPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+    return(NULL);
+}
+static void des_xmlBufPtr(int no ATTRIBUTE_UNUSED, xmlBufPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {
+}
+
+static int
+test_xmlBufGetNodeContent(void) {
+    int test_ret = 0;
+
+    int mem_base;
+    int ret_val;
+    xmlBufPtr buf; /* a buffer xmlBufPtr */
+    int n_buf;
+    xmlNodePtr cur; /* the node being read */
+    int n_cur;
+
+    for (n_buf = 0;n_buf < gen_nb_xmlBufPtr;n_buf++) {
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {
+        mem_base = xmlMemBlocks();
+        buf = gen_xmlBufPtr(n_buf, 0);
+        cur = gen_xmlNodePtr(n_cur, 1);
+
+        ret_val = xmlBufGetNodeContent(buf, cur);
+        desret_int(ret_val);
+        call_tests++;
+        des_xmlBufPtr(n_buf, buf, 0);
+        des_xmlNodePtr(n_cur, cur, 1);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlBufGetNodeContent",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_buf);
+            printf(" %d", n_cur);
+            printf("\n");
+        }
+    }
+    }
+    function_tests++;
+
+    return(test_ret);
+}
+
+
+static int
+test_xmlBufNodeDump(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
+static int
+test_xmlBufShrink(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
+static int
+test_xmlBufUse(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
 static int
 test_xmlBufferAdd(void) {
     int test_ret = 0;
@@ -18613,6 +18804,38 @@ test_xmlBufferCreateStatic(void) {
 }
 
 
+static int
+test_xmlBufferDetach(void) {
+    int test_ret = 0;
+
+    int mem_base;
+    xmlChar * ret_val;
+    xmlBufferPtr buf; /* the buffer */
+    int n_buf;
+
+    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {
+        mem_base = xmlMemBlocks();
+        buf = gen_xmlBufferPtr(n_buf, 0);
+
+        ret_val = xmlBufferDetach(buf);
+        desret_xmlChar_ptr(ret_val);
+        call_tests++;
+        des_xmlBufferPtr(n_buf, buf, 0);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlBufferDetach",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_buf);
+            printf("\n");
+        }
+    }
+    function_tests++;
+
+    return(test_ret);
+}
+
+
 static int
 test_xmlBufferEmpty(void) {
     int test_ret = 0;
@@ -23957,13 +24180,19 @@ static int
 test_tree(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing tree : 138 of 157 functions ...\n");
+    if (quiet == 0) printf("Testing tree : 142 of 164 functions ...\n");
     test_ret += test_xmlAddChild();
     test_ret += test_xmlAddChildList();
     test_ret += test_xmlAddNextSibling();
     test_ret += test_xmlAddPrevSibling();
     test_ret += test_xmlAddSibling();
     test_ret += test_xmlAttrSerializeTxtContent();
+    test_ret += test_xmlBufContent();
+    test_ret += test_xmlBufEnd();
+    test_ret += test_xmlBufGetNodeContent();
+    test_ret += test_xmlBufNodeDump();
+    test_ret += test_xmlBufShrink();
+    test_ret += test_xmlBufUse();
     test_ret += test_xmlBufferAdd();
     test_ret += test_xmlBufferAddHead();
     test_ret += test_xmlBufferCCat();
@@ -23972,6 +24201,7 @@ test_tree(void) {
     test_ret += test_xmlBufferCreate();
     test_ret += test_xmlBufferCreateSize();
     test_ret += test_xmlBufferCreateStatic();
+    test_ret += test_xmlBufferDetach();
     test_ret += test_xmlBufferEmpty();
     test_ret += test_xmlBufferGrow();
     test_ret += test_xmlBufferLength();
@@ -28345,6 +28575,50 @@ test_xmlOutputBufferFlush(void) {
 }
 
 
+static int
+test_xmlOutputBufferGetContent(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_OUTPUT_ENABLED)
+    int mem_base;
+    const xmlChar * ret_val;
+    xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */
+    int n_out;
+
+    for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {
+        mem_base = xmlMemBlocks();
+        out = gen_xmlOutputBufferPtr(n_out, 0);
+
+        ret_val = xmlOutputBufferGetContent(out);
+        desret_const_xmlChar_ptr(ret_val);
+        call_tests++;
+        des_xmlOutputBufferPtr(n_out, out, 0);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlOutputBufferGetContent",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_out);
+            printf("\n");
+        }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
+static int
+test_xmlOutputBufferGetSize(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
 static int
 test_xmlOutputBufferWrite(void) {
     int test_ret = 0;
@@ -28889,7 +29163,7 @@ static int
 test_xmlIO(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlIO : 39 of 48 functions ...\n");
+    if (quiet == 0) printf("Testing xmlIO : 40 of 50 functions ...\n");
     test_ret += test_xmlAllocOutputBuffer();
     test_ret += test_xmlAllocParserInputBuffer();
     test_ret += test_xmlCheckFilename();
@@ -28915,6 +29189,8 @@ test_xmlIO(void) {
     test_ret += test_xmlOutputBufferCreateFile();
     test_ret += test_xmlOutputBufferCreateFilename();
     test_ret += test_xmlOutputBufferFlush();
+    test_ret += test_xmlOutputBufferGetContent();
+    test_ret += test_xmlOutputBufferGetSize();
     test_ret += test_xmlOutputBufferWrite();
     test_ret += test_xmlOutputBufferWriteEscape();
     test_ret += test_xmlOutputBufferWriteString();
@@ -32274,6 +32550,54 @@ test_xmlTextReaderRelaxNGValidate(void) {
 }
 
 
+static int
+test_xmlTextReaderRelaxNGValidateCtxt(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_SCHEMAS_ENABLED)
+    int mem_base;
+    int ret_val;
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */
+    int n_reader;
+    xmlRelaxNGValidCtxtPtr ctxt; /* the RelaxNG schema validation context or NULL */
+    int n_ctxt;
+    int options; /* options (not used yet) */
+    int n_options;
+
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {
+    for (n_ctxt = 0;n_ctxt < gen_nb_xmlRelaxNGValidCtxtPtr;n_ctxt++) {
+    for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {
+        mem_base = xmlMemBlocks();
+        reader = gen_xmlTextReaderPtr(n_reader, 0);
+        ctxt = gen_xmlRelaxNGValidCtxtPtr(n_ctxt, 1);
+        options = gen_parseroptions(n_options, 2);
+
+        ret_val = xmlTextReaderRelaxNGValidateCtxt(reader, ctxt, options);
+        desret_int(ret_val);
+        call_tests++;
+        des_xmlTextReaderPtr(n_reader, reader, 0);
+        des_xmlRelaxNGValidCtxtPtr(n_ctxt, ctxt, 1);
+        des_parseroptions(n_options, options, 2);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlTextReaderRelaxNGValidateCtxt",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_reader);
+            printf(" %d", n_ctxt);
+            printf(" %d", n_options);
+            printf("\n");
+        }
+    }
+    }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
 static int
 test_xmlTextReaderSchemaValidate(void) {
     int test_ret = 0;
@@ -32628,7 +32952,7 @@ static int
 test_xmlreader(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlreader : 75 of 85 functions ...\n");
+    if (quiet == 0) printf("Testing xmlreader : 76 of 86 functions ...\n");
     test_ret += test_xmlNewTextReader();
     test_ret += test_xmlNewTextReaderFilename();
     test_ret += test_xmlReaderForDoc();
@@ -32696,6 +33020,7 @@ test_xmlreader(void) {
     test_ret += test_xmlTextReaderReadState();
     test_ret += test_xmlTextReaderRelaxNGSetSchema();
     test_ret += test_xmlTextReaderRelaxNGValidate();
+    test_ret += test_xmlTextReaderRelaxNGValidateCtxt();
     test_ret += test_xmlTextReaderSchemaValidate();
     test_ret += test_xmlTextReaderSchemaValidateCtxt();
     test_ret += test_xmlTextReaderSetErrorHandler();
@@ -34495,6 +34820,55 @@ test_xmlSchemaValidateOneElement(void) {
 }
 
 
+static int
+test_xmlSchemaValidateSetFilename(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_SCHEMAS_ENABLED)
+    int mem_base;
+    xmlSchemaValidCtxtPtr vctxt; /* the schema validation context */
+    int n_vctxt;
+    const char * filename; /* the file name */
+    int n_filename;
+
+    for (n_vctxt = 0;n_vctxt < gen_nb_xmlSchemaValidCtxtPtr;n_vctxt++) {
+    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
+        mem_base = xmlMemBlocks();
+        vctxt = gen_xmlSchemaValidCtxtPtr(n_vctxt, 0);
+        filename = gen_filepath(n_filename, 1);
+
+        xmlSchemaValidateSetFilename(vctxt, filename);
+        call_tests++;
+        des_xmlSchemaValidCtxtPtr(n_vctxt, vctxt, 0);
+        des_filepath(n_filename, filename, 1);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlSchemaValidateSetFilename",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_vctxt);
+            printf(" %d", n_filename);
+            printf("\n");
+        }
+    }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
+static int
+test_xmlSchemaValidateSetLocator(void) {
+    int test_ret = 0;
+
+
+    /* missing type support */
+    return(test_ret);
+}
+
+
 static int
 test_xmlSchemaValidateStream(void) {
     int test_ret = 0;
@@ -34560,7 +34934,7 @@ static int
 test_xmlschemas(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlschemas : 15 of 25 functions ...\n");
+    if (quiet == 0) printf("Testing xmlschemas : 16 of 27 functions ...\n");
     test_ret += test_xmlSchemaDump();
     test_ret += test_xmlSchemaGetParserErrors();
     test_ret += test_xmlSchemaGetValidErrors();
@@ -34582,6 +34956,8 @@ test_xmlschemas(void) {
     test_ret += test_xmlSchemaValidateDoc();
     test_ret += test_xmlSchemaValidateFile();
     test_ret += test_xmlSchemaValidateOneElement();
+    test_ret += test_xmlSchemaValidateSetFilename();
+    test_ret += test_xmlSchemaValidateSetLocator();
     test_ret += test_xmlSchemaValidateStream();
 
     if (test_ret != 0)
@@ -43462,6 +43838,47 @@ test_xmlTextWriterSetIndentString(void) {
 }
 
 
+static int
+test_xmlTextWriterSetQuoteChar(void) {
+    int test_ret = 0;
+
+#if defined(LIBXML_WRITER_ENABLED)
+    int mem_base;
+    int ret_val;
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */
+    int n_writer;
+    xmlChar quotechar; /* the quote character */
+    int n_quotechar;
+
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {
+    for (n_quotechar = 0;n_quotechar < gen_nb_xmlChar;n_quotechar++) {
+        mem_base = xmlMemBlocks();
+        writer = gen_xmlTextWriterPtr(n_writer, 0);
+        quotechar = gen_xmlChar(n_quotechar, 1);
+
+        ret_val = xmlTextWriterSetQuoteChar(writer, quotechar);
+        desret_int(ret_val);
+        call_tests++;
+        des_xmlTextWriterPtr(n_writer, writer, 0);
+        des_xmlChar(n_quotechar, quotechar, 1);
+        xmlResetLastError();
+        if (mem_base != xmlMemBlocks()) {
+            printf("Leak of %d blocks found in xmlTextWriterSetQuoteChar",
+                  xmlMemBlocks() - mem_base);
+           test_ret++;
+            printf(" %d", n_writer);
+            printf(" %d", n_quotechar);
+            printf("\n");
+        }
+    }
+    }
+    function_tests++;
+#endif
+
+    return(test_ret);
+}
+
+
 static int
 test_xmlTextWriterStartAttribute(void) {
     int test_ret = 0;
@@ -45324,7 +45741,7 @@ static int
 test_xmlwriter(void) {
     int test_ret = 0;
 
-    if (quiet == 0) printf("Testing xmlwriter : 51 of 79 functions ...\n");
+    if (quiet == 0) printf("Testing xmlwriter : 52 of 80 functions ...\n");
     test_ret += test_xmlNewTextWriter();
     test_ret += test_xmlNewTextWriterFilename();
     test_ret += test_xmlNewTextWriterMemory();
@@ -45344,6 +45761,7 @@ test_xmlwriter(void) {
     test_ret += test_xmlTextWriterFullEndElement();
     test_ret += test_xmlTextWriterSetIndent();
     test_ret += test_xmlTextWriterSetIndentString();
+    test_ret += test_xmlTextWriterSetQuoteChar();
     test_ret += test_xmlTextWriterStartAttribute();
     test_ret += test_xmlTextWriterStartAttributeNS();
     test_ret += test_xmlTextWriterStartCDATA();
@@ -48707,6 +49125,7 @@ test_xmlXPathNodeSetAdd(void) {
 
 #if defined(LIBXML_XPATH_ENABLED)
     int mem_base;
+    int ret_val;
     xmlNodeSetPtr cur; /* the initial node set */
     int n_cur;
     xmlNodePtr val; /* a new xmlNodePtr */
@@ -48718,7 +49137,8 @@ test_xmlXPathNodeSetAdd(void) {
         cur = gen_xmlNodeSetPtr(n_cur, 0);
         val = gen_xmlNodePtr(n_val, 1);
 
-        xmlXPathNodeSetAdd(cur, val);
+        ret_val = xmlXPathNodeSetAdd(cur, val);
+        desret_int(ret_val);
         call_tests++;
         des_xmlNodeSetPtr(n_cur, cur, 0);
         des_xmlNodePtr(n_val, val, 1);
@@ -48746,6 +49166,7 @@ test_xmlXPathNodeSetAddNs(void) {
 
 #if defined(LIBXML_XPATH_ENABLED)
     int mem_base;
+    int ret_val;
     xmlNodeSetPtr cur; /* the initial node set */
     int n_cur;
     xmlNodePtr node; /* the hosting node */
@@ -48761,7 +49182,8 @@ test_xmlXPathNodeSetAddNs(void) {
         node = gen_xmlNodePtr(n_node, 1);
         ns = gen_xmlNsPtr(n_ns, 2);
 
-        xmlXPathNodeSetAddNs(cur, node, ns);
+        ret_val = xmlXPathNodeSetAddNs(cur, node, ns);
+        desret_int(ret_val);
         call_tests++;
         des_xmlNodeSetPtr(n_cur, cur, 0);
         des_xmlNodePtr(n_node, node, 1);
@@ -48792,6 +49214,7 @@ test_xmlXPathNodeSetAddUnique(void) {
 
 #if defined(LIBXML_XPATH_ENABLED)
     int mem_base;
+    int ret_val;
     xmlNodeSetPtr cur; /* the initial node set */
     int n_cur;
     xmlNodePtr val; /* a new xmlNodePtr */
@@ -48803,7 +49226,8 @@ test_xmlXPathNodeSetAddUnique(void) {
         cur = gen_xmlNodeSetPtr(n_cur, 0);
         val = gen_xmlNodePtr(n_val, 1);
 
-        xmlXPathNodeSetAddUnique(cur, val);
+        ret_val = xmlXPathNodeSetAddUnique(cur, val);
+        desret_int(ret_val);
         call_tests++;
         des_xmlNodeSetPtr(n_cur, cur, 0);
         des_xmlNodePtr(n_val, val, 1);