1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-25 23:21:26 +03:00
Commit Graph

116 Commits

Author SHA1 Message Date
Nick Wellnhofer
da274bfa55 build: Fix build when certain modules are disabled 2023-09-21 02:26:43 +02:00
Nick Wellnhofer
9b5cce7a71 include: Remove more unnecessary includes 2023-09-21 01:50:53 +02:00
Nick Wellnhofer
699299cae3 globals: Stop including globals.h 2023-09-20 22:07:40 +02:00
Nick Wellnhofer
209516acbf tests: Don't use deprecated symbols 2023-09-20 22:06:49 +02:00
Nick Wellnhofer
c3c6cc6202 runtest: Fix compilation without LIBXML_HTML_ENABLED
Fixes #545.
2023-05-24 20:08:56 +02:00
Nick Wellnhofer
4f49017e37 tests: Test streaming schema validation 2023-04-30 21:45:39 +02:00
Nick Wellnhofer
0ffc2d82b5 runtest: Skip element name in schema error messages
This makes sure that memory and streaming tests will report the same
messages.
2023-04-30 21:45:39 +02:00
Nick Wellnhofer
886bf4e63b Stop calling xmlMemoryDump
This was used to check for memory leaks but could potentially create a
.memdump file. These days, there are better ways to check for memory
leaks.
2023-04-30 15:48:41 +02:00
Nick Wellnhofer
dd3569eaa5 Remove XMLDECL macro from .c files 2022-12-08 02:43:17 +01:00
Nick Wellnhofer
76c6da4209 error: Make sure that error messages are valid UTF-8
This has caused issues with the Python bindings for a long time.

Should fix #64.
2022-12-04 23:34:19 +01:00
Nick Wellnhofer
05c3a458aa tests: Check that xmlInitParser doesn't allocate memory 2022-11-27 02:11:07 +01:00
Nick Wellnhofer
34a5a4a5e5 tests: Remove unneeded #includes 2022-11-22 16:03:05 +01:00
Nick Wellnhofer
9c63cea5a6 test: Add test for push parser boundaries 2022-11-20 21:27:59 +01:00
Nick Wellnhofer
ea7c9fb5dd xinclude: Don't create result doc for test with errors 2022-10-23 14:27:05 +02:00
Nick Wellnhofer
c99cde3f21 xinclude: Also test error messages
The reader interface with XIncludes is somewhat broken and can generate
different error messages. Start to move tests which are sketchy with
reader to a separate directory.
2022-10-23 14:26:59 +02:00
Nick Wellnhofer
a9669679f5 error: Don't use initGenericErrorDefaultFunc
The code in xmlInitParser did only set the error handler if it was NULL
which should never happen.
2022-09-09 13:52:48 +02:00
Nick Wellnhofer
13a6637815 Remove BeOS support
Haiku shouldn't be affected.
2022-09-04 01:05:51 +02:00
Nick Wellnhofer
caef85633e Move automata test to runtest.c 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
5bffa33a12 Stop including sys/types.h 2022-09-02 18:33:36 +02:00
Nick Wellnhofer
a308c0cdf7 Deprecate old HTML SAX API 2022-08-25 21:04:57 +02:00
Nick Wellnhofer
c61e12739f Fix warnings when testing --with-minimum build
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.
2022-04-21 06:58:14 +02:00
Nick Wellnhofer
4612ce3031 Implement xpath1() XPointer scheme
See https://www.w3.org/2005/04/xpointer-schemes/
2022-04-21 04:26:52 +02:00
Nick Wellnhofer
670701075b Add configuration flag for XPointer locations support
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.
2022-04-21 02:41:58 +02:00
Nick Wellnhofer
7204dbb0ad Don't mix declarations and code in runtest.c 2022-04-13 16:51:49 +02:00
Nick Wellnhofer
48f191e7d7 Fix schemas and relaxng tests
Run all tests in runtest.c with warnings. This is required to match the
schema validation output from xmllint and doesn't seem to cause any
problems.

Fix the .xml file pattern.

Check parser errors. Print xmllint message if Relax-NG schema can't be
parsed.
2022-04-04 04:28:15 +02:00
Nick Wellnhofer
5ce893c0c4 Move regexp tests to runtest 2022-04-04 04:28:15 +02:00
Nick Wellnhofer
f1c32b4c78 Allow missing result files in runtest
Treat missing files as empty.
2022-04-04 04:28:15 +02:00
Nick Wellnhofer
95c7f315ab Move SVG tests to runtest.c
Also update the test results for the first time since 2000.
2022-04-04 04:18:07 +02:00
David Seifert
865520f048 Respect --sysconfdir in source files
* Prefix installations need to point to a non-root `etc`
  - Gentoo Prefix has been patching this for over 10 years:
    https://bugs.gentoo.org/317891
  - MacPorts has to manually replace paths after patching:
    cc3bb736e9/textproc/libxml2/Portfile (L46)
2022-03-30 14:36:49 +00:00
Nick Wellnhofer
2489c1d024 Remove useless __CYGWIN__ checks
From what I can tell, some really early Cygwin versions from around
1998-2000 used to erroneously define _WIN32. This was eventually fixed,
but these days, the `defined(_WIN32) && !defined(__CYGWIN__)` idiom is
unnecessary.

Now, we only check for __CYGWIN__ in xmlexports.h when deciding whether
to use __declspec.
2022-02-28 22:58:35 +01:00
Nick Wellnhofer
b057239b3f More fixes to --without-valid build
Fix runtest and Python bindings when building --without-valid.

The Python tests still fail. There doesn't seem to be a mechanism to
disable tests depending on feature flags.
2022-02-22 11:52:38 +01:00
Nick Wellnhofer
21217dd94c Add explicit casts in runtest.c
Avoids integer conversion warnings with UBSan.
2022-01-25 03:07:30 +01:00
Finn Barber
87a9927042 Added regression tests for xmlReadFd() and htmlReadFd() 2022-01-16 15:32:45 +01:00
Nick Wellnhofer
e1c2d0adf0 Fix memory leak in runtest.c 2020-08-17 01:17:39 +02:00
Markus Rickert
e6ba4bd775 Add command line option for temp directory in runtest 2020-07-12 18:33:35 +02:00
Nick Wellnhofer
f20daa9e51 Enable error tests with entity substitution 2020-02-11 17:36:43 +01:00
Daniel Richard G
1fda32480c Fix exponent digits when running tests under old MSVC
Switch printf output format to two-digit exponent under certain MSVC
versions.

Closes #111.
2019-10-14 16:48:32 +02:00
Jared Yanovich
2a350ee9b4 Large batch of typo fixes
Closes #109.
2019-09-30 18:04:38 +02:00
Daniel Richard G
6c91dd9495 Don't call printf with NULL string in runtest.c
Avoids undefined behavior causing problems on HP-UX and Solaris.

Closes #78.
2019-08-02 13:18:13 +02:00
Nick Wellnhofer
dcae579eca Remove unneeded function pointer casts 2019-01-06 14:25:18 +01:00
Nick Wellnhofer
8919885ff9 Fix -Wformat-truncation warnings (GCC 8) 2019-01-06 14:24:59 +01:00
Nick Wellnhofer
dc6d2a4987 Don't run icu_parse_test if EUC-JP is unsupported
Closes: #25
2018-09-04 17:13:29 +02:00
Nick Wellnhofer
4b4135977e Skip EBCDIC tests if EBCDIC isn't supported
Fixes bug 603432.
2017-11-04 15:25:30 +01:00
Nick Wellnhofer
cf820462b7 Rework handling of return values in thread tests
Pass a struct to each thread that contains the filename and the return
value. This avoids casting a DWORD to a pointer on Windows.
2017-10-21 14:52:35 +02:00
Nick Wellnhofer
82e0394d46 Fix runtest on Windows
Unbuffer the output and fix some compiler warnings.
2017-10-09 14:35:56 +02:00
Nick Wellnhofer
e3890546d7 Fix the Windows header mess
Don't include windows.h and wsockcompat.h from config.h but only when
needed.

Don't define _WINSOCKAPI_ manually. This was apparently done to stop
windows.h from including winsock.h which is a problem if winsock2.h
wasn't included first. But on MinGW, this causes compiler warnings.
Define WIN32_LEAN_AND_MEAN instead which has the same effect.

Always use the compiler-defined _WIN32 macro instead of WIN32.
2017-10-09 14:35:40 +02:00
Nick Wellnhofer
81c01ee9ff Fix unused-parameter warnings 2017-06-17 14:12:53 +02:00
Nick Wellnhofer
dbaab1f369 Test SAX2 callbacks with entity substitution
This detects regressions like bug 760367.
2017-06-16 21:38:57 +02:00
Nick Wellnhofer
01a4b81a03 Support catalog and threads tests under --without-sax1 2017-06-16 21:27:47 +02:00
David Kilzer
85c112a082 Add test cases for bug 758518
test/HTML/758518-entity.html exposed a bug in pushParseTest() in
runtest.c which assumed that an input file was at least 4 bytes long.
That test case is only 3 bytes, so we now take the minimum of 4 bytes
or the length of the test input.  We also now use 'chunkSize' in place
of the hard-coded value '1024' later in the function.
2017-06-12 18:26:11 +02:00