summaryrefslogtreecommitdiff
path: root/gentest.py
Commit message (Collapse)AuthorAgeFilesLines
* gentest.py: Fix memory leak in API testsNick Wellnhofer2022-12-081-3/+3
| | | | Regressed in commit ff34ba3e.
* Use python3 not pythonRoss Burton2022-12-071-1/+1
| | | | | | | | | | | | | As per https://peps.python.org/pep-0394/, the python binary can be one of the following options: - Python 2 - Python 3 - Not exist All of the scripts in libxml2 use 'python', which may not exist. As Python 2 reached EOL on the 1st January 2020, it's safe to move the scripts to use python3 explicitly.
* buf: Deprecate static/immutable buffersNick Wellnhofer2022-11-201-1/+0
|
* Make gentest.py work with Python 2Nick Wellnhofer2022-08-171-1/+1
|
* Fix warnings when testing --with-minimum buildNick Wellnhofer2022-04-211-6/+3
| | | | | | There's no simple way to make the doc/examples tests handle different configurations. But these tests aren't especially valuable, so remove the result file checks.
* Add configuration flag for XPointer locations supportNick Wellnhofer2022-04-211-0/+7
| | | | | | | | | | | | | | | | | | | | | Add a new configuration flag that controls whether the outdated support for XPointer locations (ranges and points) is enabled. --with-xptr-locs # Autotools LIBXML2_WITH_XPTR_LOCS # CMake The latest spec for what it essentially an XPath extension seems to be this working draft from 2002: https://www.w3.org/TR/xptr-xpointer/ The xpointer() scheme is listed as "being reviewed" in the XPointer registry since at least 2006. libxml2 seems to be the only modern software that tries to implement this spec, but the code has many bugs and quality issues. The flag defaults to "off" and support for this extensions has to be requested explicitly. The relevant API functions are deprecated.
* Port gentest.py to Python 3Nick Wellnhofer2022-04-211-212/+209
|
* Use portable python shebangsDavid Seifert2022-04-061-1/+1
| | | | | * In conda or Gentoo Prefix, we don't want to use the system python and instead rely on PATH lookup.
* Remove DOCBparserNick Wellnhofer2022-03-041-4/+0
| | | | | | | This code has been broken and deprecated since version 2.6.0, released in 2003. Because of a bug in commit 961b535c, DOCBparser.c was never compiled since 2012. I couldn't find a Debian package using any of its symbols, so it seems safe to remove this module.
* Disable legacy support by defaultNick Wellnhofer2022-02-201-5/+3
| | | | | | If you need support for legacy APIs, you have to enable it explicitly: ./configure --with-legacy
* Fix typosNick Wellnhofer2020-03-081-2/+2
| | | | Resolves #133.
* Fix unused function warning in testapi.cNick Wellnhofer2019-01-061-8/+16
| | | | | | Check whether all param and return types are known before generating functions for param types. Otherwise, unused functions end up in testapi.c.
* Avoid out-of-bound array access in API testsNick Wellnhofer2017-06-011-0/+18
| | | | | | | | | | | The API tests combine string buffers with arbitrary length values which makes ASan detect out-of-bound array accesses. Even without ASan, this could lead to unwanted test failures. Add a check for "len", "size", and "start" arguments, assuming they apply to the nearest char pointer. Skip the test if they exceed the buffer size. This is a somewhat naive heuristic but it seems to work well.
* Borland C fix from Moritz Both regenerate, workaround a problem for bufferDaniel Veillard2008-09-011-0/+1
| | | | | | | | | | | | | | | | | | | * trionan.c: Borland C fix from Moritz Both * testapi.c: regenerate, workaround a problem for buffer testing * xmlIO.c HTMLtree.c: new internal entry point to hide even better xmlAllocOutputBufferInternal * tree.c: harden the code around buffer allocation schemes * parser.c: restore the warning when namespace names are not absolute URIs * runxmlconf.c: continue regression tests if we get the expected number of errors * Makefile.am: run the python tests on make check * xmlsave.c: handle the HTML documents and trees * python/libxml.c: convert python serialization to the xmlSave APIs and avoid some horrible hacks Daniel svn path=/trunk/; revision=3790
* fix a small initialization problem raised by Ashwin increase testingDaniel Veillard2008-08-271-0/+2
| | | | | | | | | | | | | * threads.c: fix a small initialization problem raised by Ashwin * testapi.c gentest.py: increase testing especially for document with an internal subset, and entities * tree.c: fix a deallocation issue when unlinking entities from a document. * valid.c: fix a missing entry point test not found previously. * doc/*: regenerated the APIs, docs etc. daniel svn path=/trunk/; revision=3778
* implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stickDaniel Veillard2008-07-291-1/+2
| | | | | | | | | | | * include/libxml/parser.h include/libxml/xmlerror.h parser.c: implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stick to old behaviour * testapi.c gentest.py: modified slightly and regenerated * Makefile.am: add testchar Daniel svn path=/trunk/; revision=3755
* added a GROW when parsing complex comments (bug #405666) added a hack toWilliam M. Brack2007-02-081-5/+8
| | | | | | | | | | * parser.c: added a GROW when parsing complex comments (bug #405666) * gentest.py, testapi.c: added a hack to prevent destruction of any param with 'destroy' in it's description (i.e. param destroyed by the routine under test, so shouldn't be destroyed by testapi) * xmlreader.c: added freeing of 'input' param even on error svn path=/trunk/; revision=3579
* fixed second spot where CRLF split between chunks could cause trouble (bugWilliam M. Brack2005-10-221-0/+1
| | | | | | | | * parser.c: fixed second spot where CRLF split between chunks could cause trouble (bug #319279) * gentest.py, testapi.c: fixed two problems involved with --with-minimum compilation (compilation errors with schematron and formal expressions tests)
* preparing to make testsuite releases along with code source releases fixedDaniel Veillard2005-07-101-1/+2
| | | | | | | | | | | | | * xstc/Makefile.am README README.tests Makefile.tests Makefile.am: preparing to make testsuite releases along with code source releases * gentest.py testapi.c: fixed a couple of problem introduced by the new Schemas support for Readers * xpath.c: fixed the XPath attribute:: bug #309580, #309864 in a crude but simple way. * xmlschemas.c include/libxml/tree.h: fixed a couple of problems raised by the doc builder. * doc/*: made rebuild Daniel
* fix a problem with previous patch to testapi.c DanielDaniel Veillard2005-07-031-0/+1
| | | | | | * gentest.py testapi.c: fix a problem with previous patch to testapi.c Daniel
* fixed problem with 'minimal library' compilation (LIBXML_PATTERN_ENABLEDWilliam M. Brack2005-03-251-0/+1
| | | | | | * gentest.py, testapi.c: fixed problem with 'minimal library' compilation (LIBXML_PATTERN_ENABLED not properly checked) reported by Greg Morgan
* This change started out as a simple desire to speed up theWilliam M. Brack2005-02-131-6/+14
| | | | | | | | | | | | | | | | execution time of testapi.c, which was being delayed by nameserver requests for non-existent URL's. From there it just sort of grew, and grew.... * nanohttp.c, nanoftp.c: changed the processing of URL's to use the uri.c routines instead of custom code. * include/libxml/xmlerror.h: added code XML_FTP_URL_SYNTAX * uri.c: added accepting ipV6 addresses, in accordance with RFC's 2732 and 2373 (TODO: allow ipV4 within ipV6) * gentest.py, testapi.c: fixed a few problems with the testing of the nanoftp and nanohttp routines. * include/libxml/xmlversion.h: minor change to fix a warning on the docs generation * regenerated the docs
* had to fix generation and rebuild. the testapi found a bug in the lastDaniel Veillard2005-01-261-0/+2
| | | | | | * gentest.py testapi.c: had to fix generation and rebuild. * valid.c: the testapi found a bug in the last code of course ! Daniel
* William noticed I forgot to add special support for xmlmodules.c defineDaniel Veillard2005-01-091-0/+1
| | | | | | | | | * gentest.py testapi.c: William noticed I forgot to add special support for xmlmodules.c define * xmlregexp.c include/libxml/xmlregexp.h: added terminal to xmlRegExecErrInfo() API, adding new xmlRegExecNextValues() entry point and refactored to use both code. Daniel
* Re-examined the problems of configuring a "minimal" library.William M. Brack2005-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Synchronized the header files with the library code in order to assure that all the various conditionals (LIBXML_xxxx_ENABLED) were the same in both. Modified the API database content to more accurately reflect the conditionals. Enhanced the generation of that database. Although there was no substantial change to any of the library code's logic, a large number of files were modified to achieve the above, and the configuration script was enhanced to do some automatic enabling of features (e.g. --with-xinclude forces --with-xpath). Additionally, all the format errors discovered by apibuild.py were corrected. * configure.in: enhanced cross-checking of options * doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml, doc/libxml2-api.xml, gentest.py: changed the usage of the <cond> element in module descriptions * elfgcchack.h, testapi.c: regenerated with proper conditionals * HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c, testSAX.c: cleaned up conditionals * include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h, hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h, valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]: synchronized the conditionals with the corresponding module code * doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c: added additional conditions required for compilation * doc/*.html, doc/html/*.html: rebuilt the docs
* enhanced for enabling build in a different directory. Added (optional)William M. Brack2004-12-231-4/+18
| | | | | | | | | | | | | | | * Makefile.am, gentest.py: enhanced for enabling build in a different directory. Added (optional) param to gentest.py to specify the source directory (bug #155468) * doc/Makefile.am: changed destination of NEWS from (top_srcdir) to (top_builddir) (bug #155468) * python/Makefile.am, python/generator.py: enhanced for enabling build in a different directory(bug #155468). Added (optional) param to generator.py to specify the source directory. Added a new table of functions which have possible "foreign" encodings (e.g. UTF16), and code to use python 't' format instead of 'z' format (mostly solving bug #152286, but still need to populate the table).
* make sure xmlCtxtReadFile and htmlCtxtReadFile go through the catalogDaniel Veillard2004-11-261-1/+1
| | | | | | | * HTMLparser.c parser.c: make sure xmlCtxtReadFile and htmlCtxtReadFile go through the catalog resolution. * gentest.py testapi.c: fix a side effect wrning of the change Daniel
* further enhancement, now all compilation warnings have been fixed. addedWilliam M. Brack2004-11-141-20/+51
| | | | | | * gentest.py, testapi.c: further enhancement, now all compilation warnings have been fixed. * xmlschemastypes.c: added NULL check for one function
* trivial change (changed CHECK_CONTEXT to CHECK_CTXT on a couple of lines)William M. Brack2004-11-121-14/+21
| | | | | | * xpath.c: trivial change (changed CHECK_CONTEXT to CHECK_CTXT on a couple of lines) * gentest.py, testapi.c: enhanced to reduce compilation warnings
* integrated in "make tests" added -q option, and more conditional featuresDaniel Veillard2004-11-091-2/+3
| | | | | | | | | | | * Makefile.am gentest.py testapi.c: integrated in "make tests" added -q option, and more conditional features fixes * catalog.c debugXML.c parser.c testThreads.c xmllint.c xmlschemastypes.c xmlwriter.cinclude/libxml/catalog.h include/libxml/debugXML.h: various compilation and conditional cleanups. * doc/*: regenerated Daniel
* better handling of conditional features more testing on parser contextsDaniel Veillard2004-11-091-12/+123
| | | | | | | * gentest.py testapi.c: better handling of conditional features * HTMLparser.c SAX2.c parserInternals.c xmlwriter.c: more testing on parser contexts closed leaks, error messages Daniel
* better parser options coverage more cleanups. DanielDaniel Veillard2004-11-081-0/+3
| | | | | | * gentest.py testapi.c: better parser options coverage * SAX2.c xpath.c: more cleanups. Daniel
* more coverage more fixes DanielDaniel Veillard2004-11-081-7/+8
| | | | | | * gentest.py testapi.c: more coverage * debugXML.c parser.c xmlregexp.c xpath.c: more fixes Daniel
* more coverage more fixes DanielDaniel Veillard2004-11-081-3/+24
| | | | | | * gentest.py testapi.c: more coverage * SAX2.c parser.c parserInternals.c: more fixes Daniel
* more types, more coverage more problems fixed DanielDaniel Veillard2004-11-081-14/+21
| | | | | | | * gentest.py testapi.c: more types, more coverage * parser.c parserInternals.c relaxng.c valid.c xmlIO.c xmlschemastypes.c: more problems fixed Daniel
* fixed test file corruption problemWilliam M. Brack2004-11-081-1/+3
| | | | * gentest.py: fixed test file corruption problem
* fixed typos and avoid Catalogs verbosity DanielDaniel Veillard2004-11-071-0/+2
| | | | | * gentest.py testapi.c: fixed typos and avoid Catalogs verbosity Daniel
* augmented types supported a number of new bug fixes and documentationDaniel Veillard2004-11-061-1/+23
| | | | | | | * gentest.py testapi.c: augmented types supported * HTMLtree.c tree.c xmlreader.c xmlwriter.c: a number of new bug fixes and documentation updates. Daniel
* augmented type autogeneration for enums removed direct error reporting.Daniel Veillard2004-11-061-1/+46
| | | | | | * gentest.py testapi.c: augmented type autogeneration for enums * xpath.c include/libxml/xpath.h: removed direct error reporting. Daniel
* autogenerate a minimal NULL value sequence for unknown pointer types ThisDaniel Veillard2004-11-051-3/+42
| | | | | | | | | | | | * gentest.py testapi.c: autogenerate a minimal NULL value sequence for unknown pointer types * HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c xpointer.c: This uncovered an impressive amount of entry points not checking for NULL pointers when they ought to, closing all the open gaps. Daniel
* more coverage one fix DanielDaniel Veillard2004-11-051-9/+13
| | | | | | * gentest.py testapi.c: more coverage * xmlunicode.c: one fix Daniel
* more coverage more fixes DanielDaniel Veillard2004-11-051-2/+6
| | | | | | * gentest.py testapi.c: more coverage * nanoftp.c tree.c: more fixes Daniel
* fixed the way the generator works, extended the testing, especially withDaniel Veillard2004-11-051-6/+27
| | | | | | | | | * gentest.py testapi.c: fixed the way the generator works, extended the testing, especially with more real trees and nodes. * HTMLtree.c tree.c valid.c xinclude.c xmlIO.c xmlsave.c: a bunch of real problems found and fixed. * entities.c: fix error reporting to go through the new handlers Daniel
* changing the way the .c is generated, extending the tests coverage fixingDaniel Veillard2004-11-041-478/+113
| | | | | | | | | * gentest.py testapi.c: changing the way the .c is generated, extending the tests coverage * include/libxml/nanoftp.h nanoftp.c elfgcchack.h doc/*: fixing some function signatures, regenerating stuff * SAX2.c parser.c xmlIO.c: another set of bug fixes and API hardening Daniel
* extending the tests coverage DanielDaniel Veillard2004-11-041-40/+129
| | | | | * gentest.py testapi.c: extending the tests coverage Daniel
* extending the tests coverage more fixes and cleanups DanielDaniel Veillard2004-11-041-47/+112
| | | | | | * gentest.py testapi.c: extending the tests coverage * HTMLtree.c tree.c xmlsave.c xpointer.c: more fixes and cleanups Daniel
* more fixes and extending the tests coverage more fixes and hardeningDaniel Veillard2004-11-031-10/+36
| | | | | | * gentest.py testapi.c: more fixes and extending the tests coverage * nanoftp.c xmlIO.c: more fixes and hardening Daniel
* more fixes and extending the tests coverage bunch of cleanups and 2 leaksDaniel Veillard2004-11-031-1/+11
| | | | | | * gentest.py testapi.c: more fixes and extending the tests coverage * valid.c: bunch of cleanups and 2 leaks removed Daniel
* more fixes and extending the tests coverage more fixes and hardeningDaniel Veillard2004-11-031-13/+94
| | | | | | * gentest.py testapi.c: more fixes and extending the tests coverage * list.c tree.c: more fixes and hardening Daniel
* more fixes and extending the tests coverage adding a type init interfaceDaniel Veillard2004-11-031-5/+28
| | | | | | | | * gentest.py testapi.c: more fixes and extending the tests coverage * relaxng.c include/libxml/relaxng.h: adding a type init interface * include/libxml/xmlerror.h parser.c xmlreader.c xmlwriter.c: more cleanups and bug fixes raised by the regression tests Daniel