summaryrefslogtreecommitdiff
path: root/python/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix expected error output in Python testsNick Wellnhofer2017-06-011-10/+0
|
* python/tests/sync.py assumes Python dictionaries are orderedJohn Beck2014-10-061-13/+16
| | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=734017 Solaris has had libxml2 version 2.9.1 for a while, with Python versions 2.6 and 2.7. While preparing to also build a module for Python 3.4, we ran into an issue with the test case sync.py failing. The failure involved parsing a string that included a Python dictionary, then complaining when the order of the parsed result did not match the original order. But Python dictionaries are unordered by definition; see section 5.5 of https://docs.python.org/2/tutorial/datastructures.html . For whatever reason, Python 2.6 and 2.7 always happened to report the pair of values back in their original order, but with Python 3.4 the order is random. The attached patch allows for either order; it also fixes a typo that was repeated several times thanks to the magic of copy & paste.
* Fix python bindings with versions older than 2.7Daniel Veillard2013-04-025-5/+2
| | | | | Need fixing on the Capsule usage, the lack of PyBytes, lack of io module and the way to access exception details.
* update all tests for Python3 and Python2Daniel Veillard2013-03-3047-474/+535
|
* Silent the new python test on inputAlexey Neyman2013-02-271-72/+87
| | | | Just make it silent if there is no error
* Python binding for xmlRegisterInputCallbackAlexey Neyman2013-02-252-0/+129
| | | | | | | | | | | | It is possible to make xmlIO handle any protocol by means of xmlRegisterInputCallback(). However, that function is currently only available in C API. So, the natural solution seems to be implementing Python bindings for the xmlRegisterInputCallback. * python/generator.py: skip xmlPopInputCallbacks * python/libxml.c python/libxml.py python/libxml_wrap.h: implement the wrappers * python/tests/input_callback.py python/tests/Makefile.am: also add a test case
* Remove all .cvsignore as they are not used anymoreDaniel Veillard2012-09-041-2/+0
| | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=682985 suggested by Adrian Bunk <bunk@stusta.de>
* Various "make distcheck" and portability fixups 2nd partDaniel Richard G2012-08-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | doc/examples/Makefile.am: * Use $(VAR), not @VAR@ * Use $(MKDIR_P) instead of $(mkinstalldirs), as the latter is an * obsolete name * Added $(srcdir) qualification to the various test program invocations * in the "tests" target. More work is needed here (notably, when the reference output contains the path to the input file), but this gets things a lot closer to working correctly in an out-of-source build. doc/examples/reader4.res: * Added "./" path qualifiers so that the reader4 test continues to pass cleanly for in-source builds python/tests/Makefile.am: * Symlink in test input files for out-of-source builds
* Various "make distcheck" and portability fixupsDaniel Richard G2012-08-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.am: * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make variable, it allows overriding the value at the command line, and (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS assignment when @MODULE_PLATFORM_LIBS@ is empty * Changed how the THREADS_W32 mechanism switches the build between testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL allows this to work cleanly and plays well with dependencies * testapi.c should be specified as BUILT_SOURCES * Create symlinks to the test/ and result/ subdirs so that the runtests target is usable in out-of-source-tree builds * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f" instead of just "rm" is good form * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to pass configure.in: * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been superceded by LT_INIT * Don't rebuild docs by default, as this requires GNU Make (as implemented) * Check for uint32_t as some platforms don't provide it * Check for some more functions, and undefine HAVE_MMAP if we don't also HAVE_MUNMAP (one system I tested on actually needed this) * Changed THREADS_W32 from a filename insert into an Automake conditional * The "Copyright" file will not be in the current directory if builddir != srcdir doc/Makefile.am: * EXTRA_DIST cannot use wildcards when they refer to generated files; this breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU Make $(wildcard) directives to build up a list of files, and EXTRA_DIST, as a literal expansion of EXTRA_DIST_wc. I also added a new rule, "check-extra-dist", to simplify checking that the two variables are equivalent. (Note that this works only when builddir == srcdir) (I can implement this differently if desired; this is just one way of doing it) * Don't define an "all" target; this steps on Automake's toes * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for dependencies (as Make doesn't process the wildcards otherwise) and qualifying appropriate files with $(srcdir) (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH, which we can count on as this is GNU-Make-only code anyway) doc/devhelp/Makefile.am: * Qualified appropriate files with $(srcdir) * Added an "uninstall-local" rule so that "make distcheck" passes doc/examples/Makefile.am: * Rather than use a wildcard that doesn't work, use a substitution that most Make programs can handle doc/examples/index.py: * Do the same here include/libxml/nanoftp.h: * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET: user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\ Include$ grep -R INVALID_SOCKET . ./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0) ./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0) include/libxml/xmlversion.h.in: * Support ancient GCCs (I was actually able to build the library with 2.5 but for this bit) python/Makefile.am: * Expanded CLEANFILES to allow "make distcheck" to pass python/tests/Makefile.am: * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow "make distcheck" to pass testRelax.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some systems have the header but not the function) testSchemas.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H testapi.c: * Don't use putenv() if it's not available threads.c: * This fixes the following build error on Solaris 8: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \ -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \ -xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o "threads.c", line 442: controlling expressions must have scalar type "threads.c", line 512: controlling expressions must have scalar type cc: acomp failed for threads.c *** Error code 1 trio.c: * Define isascii() if the system doesn't provide it trio.h: * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion win32/configure.js: * Added support for the LZMA compression option win32/Makefile.{bcb,mingw,msvc}: * Added appropriate bits to support WITH_LZMA=1 * Install the header files under $(INCPREFIX)\libxml2\libxml instead of $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools xml2-config.in: * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for `xml2-config --libs` to provide a complete set of dependencies xmllint.c: * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
* Fix html serialization error and htmlSetMetaEncoding()Daniel Veillard2012-05-111-2/+2
| | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=630682 The python tests were reporting errors, some of it was due to a small change in case encoding, but the main one was about htmlSetMetaEncoding(doc, NULL) being broken by not removing the associated meta tag anymore
* Fix memory leak in xmlXPathEvalExpression()Martin2009-10-121-1/+13
| | | | | * xpath.c: plug some leaks when parsing misformed XPath expressions * python/tests/xpathleak.py: expand the regression tests for those
* Fix python regression test after 583439 cleanupDaniel Veillard2009-08-241-1/+1
|
* applied a couple of patches from Martin avoiding some leaks, fixinq QNameDaniel Veillard2008-09-012-1/+55
| | | | | | | | | | | * schematron.c xpath.c: applied a couple of patches from Martin avoiding some leaks, fixinq QName checks in XPath, XPath debugging and schematron code cleanups. * python/tests/Makefile.am python/tests/xpathleak.py: add the specific regression tests, just tweak it to avoid output by default Daniel svn path=/trunk/; revision=3791
* fix a memory errro when using namespace nodes returned from XPath queries,Daniel Veillard2008-03-122-1/+31
| | | | | | | | | | * python/types.c: fix a memory errro when using namespace nodes returned from XPath queries, should fix #521699 * python/tests/Makefile.am python/tests/xpathns.py: add a specific regression test for it Daniel svn path=/trunk/; revision=3703
* applied cleanup patches for cross compilation and MinGW from Roumen PetrovDaniel Veillard2008-02-191-13/+2
| | | | | | | | * python/Makefile.am python/tests/Makefile.am: applied cleanup patches for cross compilation and MinGW from Roumen Petrov Daniel svn path=/trunk/; revision=3696
* patches from John Carr to start cleaning up 'make diskcheck' problems c.f.Daniel Veillard2008-01-111-0/+4
| | | | | | | | | | * check-relaxng-test-suite2.py check-relaxng-test-suite.py Makefile.am python/tests/Makefile.am python/Makefile.am check-xsddata-test-suite.py: patches from John Carr to start cleaning up 'make diskcheck' problems c.f. #506228 Daniel svn path=/trunk/; revision=3674
* Added code submitted by Andreas Pakulat to provide node equality,William M. Brack2006-06-262-1/+52
| | | | | | | | * python/libxml.c, python/libxml.py, python/tests/compareNodes.py, python/tests/Makefile.am: Added code submitted by Andreas Pakulat to provide node equality, inequality and hash functions, plus a single test program to check the functions (bugs 345779 + 345961).
* removed a potentially uninitialized variable error fixed a deprecationDaniel Veillard2005-08-241-1/+11
| | | | | | | * xpath.c: removed a potentially uninitialized variable error * python/generator.py: fixed a deprecation warning * python/tests/tstLastError.py: silent the damn test when Okay ! Daniel
* applied patch from Brent Hendricks adding namespace removal at the pythonDaniel Veillard2005-04-122-0/+63
| | | | | | | | * python/libxml.c python/libxml.py: applied patch from Brent Hendricks adding namespace removal at the python level #300209 * python/tests/Makefile.am python/tests/nsdel.py: added the regression test Daniel
* another patch from Brent Hendricks to add new handlers with the variousDaniel Veillard2005-03-304-1/+222
| | | | | | | | | * python/generator.py python/libxml.py: another patch from Brent Hendricks to add new handlers with the various validity contexts * python/tests/Makefile.am python/tests/validDTD.py python/tests/validRNG.py python/tests/validSchemas.py: also added the regression tests he provided Daniel
* added a regression test from Rob Richards for the previous bug DanielDaniel Veillard2005-03-102-0/+82
| | | | | | * python/tests/Makefile.am python/tests/readernext.py: added a regression test from Rob Richards for the previous bug Daniel
* try to fix a problem with valgrind. applied memory leak fix from BrentDaniel Veillard2005-03-022-1/+38
| | | | | | | | | * Makefile.am doc/examples/Makefile.am python/tests/Makefile.am xstc/Makefile.am: try to fix a problem with valgrind. * python/generator.py python/libxml.c python/tests/Makefile.am python/tests/tstmem.py: applied memory leak fix from Brent Hendricks c.f. bug #165349 Daniel
* fixed xmlXIncludeParseFile to prevent overwriting XML_COMPLETE_ATTRS whenWilliam M. Brack2005-02-121-0/+2
| | | | | | | | | * xinclude.c: fixed xmlXIncludeParseFile to prevent overwriting XML_COMPLETE_ATTRS when setting pctxt->loadsubset (bug 166199) * Makefile.am, python/tests/Makefile.am, xstc/Makefile.am: added code to add $(top_builddir)/.libs to LD_LIBRARY_PATH whenever PYTHONPATH is set, to assure new libxml2 routines are used.
* Applied patch from Brent Hendricks adding support for late DTD validation.Daniel Veillard2004-11-103-2/+37
| | | | | | | | | * python/generator.py python/libxml.c python/libxml2class.txt python/libxml_wrap.h python/types.c: Applied patch from Brent Hendricks adding support for late DTD validation. * python/tests/Makefile.am python/tests/dtdvalid.py python/tests/test.dtd: integrated the provided regression test Daniel
* applied patch from Malcolm Tredinnick fixing bug #154294 related to savingDaniel Veillard2004-10-041-22/+94
| | | | | | | * python/generator.py python/libxml.c python/tests/outbuf.py: applied patch from Malcolm Tredinnick fixing bug #154294 related to saving to python file objects. Daniel
* Applied patch from Torkel Lyng to add Schemas support to the PythonDaniel Veillard2004-08-182-0/+53
| | | | | | | | | | * xmlschemas.c include/libxml/xmlschemas.h python/generator.py python/libxml.c python/libxml_wrap.h python/types.c python/tests/schema.py python/tests/Makefile.am: Applied patch from Torkel Lyng to add Schemas support to the Python bindings and extend the schemas error API, registered a new test. * doc/* elfgcchack.h: rebuilt to regenerate the bindings Daniel
* added an encoding "special comment" to avoid warning message in python2.3William M. Brack2004-07-111-1/+1
| | | | | | | | | * python/drv_libxml.py: added an encoding "special comment" to avoid warning message in python2.3 (bug 146889) * Makefile.am, python/Makefile.am, python/tests/Makefile.am: small change to make "make tests" a little quieter (MAKEFLAGS+=--silent) * xpath.c: enhanced to take advantage of current libxslt handling of tmpRVT. Fixes bug 145547.
* make the push interfaces synchronous added a specific test added the newDaniel Veillard2004-07-052-2/+143
| | | | | | | | | * parser.c: make the push interfaces synchronous * python/tests/sync.py: added a specific test * python/tests/Makefile.am doc/examples/Makefile.am doc/examples/index.py: added the new test, cleaning up "make tests" output Daniel
* better portability fix for f(*args), use apply(f, args) as Stephane BidoulDaniel Veillard2004-05-111-10/+1
| | | | | | * python/tests/tstLastError.py: better portability fix for f(*args), use apply(f, args) as Stephane Bidoul suggested Daniel
* applied patch from Ed Davis to allow "make tests" to work with Python 1.5Daniel Veillard2004-05-102-2/+11
| | | | | | | * Makefile.am python/tests/Makefile.am python/tests/tstLastError.py: applied patch from Ed Davis to allow "make tests" to work with Python 1.5 Daniel
* keep the ChangeLog compressed fix a segfault when using Close() test forDaniel Veillard2004-04-182-0/+38
| | | | | | | | * libxml.spec.in: keep the ChangeLog compressed * xmlreader.c: fix a segfault when using Close() * python/tests/Makefile.am python/tests/reader8.py: test for the Close() reader API. Daniel
* applied patch from Malcolm Tredinnick to avoid tabs in python sources,Daniel Veillard2004-02-239-54/+54
| | | | | | * python/tests/*.py: applied patch from Malcolm Tredinnick to avoid tabs in python sources, should fix #135095 Daniel
* indicated encoding of the test file, needed for python 2.3 DanielDaniel Veillard2004-02-172-0/+2
| | | | | | * python/tests/indexes.py python/tests/reader.py: indicated encoding of the test file, needed for python 2.3 Daniel
* added xmlByteConsumed() interface updated the benchmark rebuilt the docsDaniel Veillard2004-02-112-1/+114
| | | | | | | | | | * parserInternals.c xmlIO.c encoding.c include/libxml/parser.h include/libxml/xmlIO.h: added xmlByteConsumed() interface * doc/*: updated the benchmark rebuilt the docs * python/tests/Makefile.am python/tests/indexes.py: added a specific regression test for xmlByteConsumed() * include/libxml/encoding.h rngparser.c tree.c: small cleanups Daniel
* applied patch from Stephane Bidoul to add enums to the Python bindings.Daniel Veillard2004-01-141-6/+6
| | | | | | * python/generator.py python/tests/tstLastError.py: applied patch from Stephane Bidoul to add enums to the Python bindings. Daniel
* applied patch from Stephane Bidoul for structured error handling fromDaniel Veillard2004-01-062-1/+74
| | | | | | | | * python/libxml2-python-api.xml python/libxml_wrap.h python/types.c python/tests/Makefile.am python/tests/tstLastError.py: applied patch from Stephane Bidoul for structured error handling from python, and the associated test Daniel
* applied fixes to allow build from 'outside' directory (Bug 129172)William M. Brack2003-12-211-1/+1
| | | | | | * python/Makefile.am, python/tests/Makefile.am, doc/Makefile.am: applied fixes to allow build from 'outside' directory (Bug 129172)
* cleanup the output buffer support to at least get the basic to work fixesDaniel Veillard2003-12-042-7/+7
| | | | | | | | | | * python/generator.py python/libxml.c python/libxml_wrap.h: cleanup the output buffer support to at least get the basic to work * python/tests/outbuf.py python/tests/serialize.py: fixes and cleanup. * include/libxml/xmlwriter.h: cleanup Daniel
* added the xmlWriter module contributed by Alfred Mickautsch added room forDaniel Veillard2003-10-201-4/+9
| | | | | | | | | | | * configure.in xmlwriter.c Makefile.am include/libxml/xmlwriter.h include/libxml/Makefile.am include/libxml/xmlversion.h.in: added the xmlWriter module contributed by Alfred Mickautsch * include/libxml/tree.h: added room for line and extra information * xmlreader.c python/tests/reader6.py: bugfixing some problem some of them introduced in September * win32/libxml2.def.src doc/libxml2-api.xml: regenerated the API Daniel
* removing xmldwalk module since it got merged with the xmlreader. cleanupDaniel Veillard2003-10-203-0/+249
| | | | | | | | | | | | | | | * Makefile.am configure.in xmldwalk.c xmlreader.c include/libxml/Makefile.am include/libxml/xmldwalk.h include/libxml/xmlversion.h.in: removing xmldwalk module since it got merged with the xmlreader. * parser.c: cleanup * win32/libxml2.def.src python/libxml2class.txt doc/libxml2-api.xml: rebuilt the API * python/tests/Makefile.am python/tests/reader7.py python/tests/walker.py: adding regression testing for the new xmlreader APIs, new APIs for reader creation, including makeing reader "walker" operating on preparsed document trees. Daniel
* fixed to not send NULL to %s printing cleaning up some of the regressionDaniel Veillard2003-10-191-1/+1
| | | | | | | | | * HTMLparser.c: fixed to not send NULL to %s printing * python/tests/error.py result/HTML/doc3.htm.err result/HTML/test3.html.err result/HTML/wired.html.err result/valid/t8.xml.err result/valid/t8a.xml.err: cleaning up some of the regression tests error Daniel
* switched Relax-NG module to teh new error reporting. Better defaultDaniel Veillard2003-10-071-2/+2
| | | | | | | | | | * error.c relaxng.c include/libxml/xmlerror.h: switched Relax-NG module to teh new error reporting. Better default report, adds the element associated if found, context and node are included in the xmlError * python/tests/reader2.py: the error messages changed. * result/relaxng/*: error message changed too. Daniel
* more cleanup in make tests more work in the transition to the new errorDaniel Veillard2003-10-031-3/+3
| | | | | | | | | * Makefile.am: more cleanup in make tests * error.c valid.c parser.c include/libxml/xmlerror.h: more work in the transition to the new error reporting strategy. * python/tests/reader2.py result/VC/* result/valid/*: few changes in the strings generated by the validation output Daniel
* cleanup, creating a new legacy.c module, made sure make tests ran inDaniel Veillard2003-09-281-1/+1
| | | | | | | | | | | | | * Makefile.am: cleanup, creating a new legacy.c module, made sure make tests ran in reduced conditions * SAX.c SAX2.c configure.in entities.c globals.c parser.c parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in: increased the modularization, allow to configure out validation code and legacy code, added a configuration option --with-minimum compiling only the mandatory code which then shrink to 200KB. Daniel
* added a new API to split a QName without generating any memory allocationDaniel Veillard2003-08-041-11/+11
| | | | | | | | | | | * tree.c include/libxml/tree.h: added a new API to split a QName without generating any memory allocation * valid.c: fixed another problem with namespaces on element in mixed content case * python/tests/reader2.py: updated the testcase with Bjorn Reese fix to reader for unsignificant white space * parser.c HTMLparser.c: cleanup. Daniel
* patch from Stéphane Bidoul for setting up threads global defaults. thisDaniel Veillard2003-05-153-3/+100
| | | | | | | | | | | * build_glob.py global.data globals.c parser.c include/libxml/globals.h: patch from Stéphane Bidoul for setting up threads global defaults. * doc/libxml2-api.xml: this extends the API with new functions * python/tests/Makefile.am python/tests/reader2.py python/tests/thread2.py: integrated the associated testcase and fixed the error string used in reader2 Daniel
* a lot of performance work especially the speed of streaming through theDaniel Veillard2003-04-211-1/+1
| | | | | | | | | * globals.c libxml.h parser.c parserInternals.c tree.c xmllint.c xmlreader.c include/libxml/parser.h: a lot of performance work especially the speed of streaming through the reader and push interface. Some thread related optimizations. Nearly doubled the speed of parsing through the reader. Daniel
* some cleanups extended the document to cover RelaxNG and tree operationsDaniel Veillard2003-04-173-0/+166
| | | | | | | | | | * relaxng.c: some cleanups * doc/xmlreader.html: extended the document to cover RelaxNG and tree operations * python/tests/Makefile.am python/tests/reader[46].py: added some xmlReader example/regression tests * result/relaxng/tutor*.err: updated the output of a number of tests Daniel
* Added the Expand() and Next() operation to work on subtrees within theDaniel Veillard2003-04-111-0/+48
| | | | | | | | | | * xmlreader.c include/libxml/xmlreader.h: Added the Expand() and Next() operation to work on subtrees within the reader framework. * doc/libxml2-api.xml python/libxml2class.txt: resulting updates * python/tests/reader5.py: added an example for those new functions of the reader. Daniel
* fixing #109227 providing more context in case of start/end tag mismatchDaniel Veillard2003-03-272-2/+2
| | | | | | | | * parser.c: fixing #109227 providing more context in case of start/end tag mismatch * python/tests/ctxterror.py python/tests/readererr.py: update the tests accordingly Daniel