mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
tests: Fix build --without-output
This commit is contained in:
@@ -176,11 +176,11 @@ check-local:
|
||||
$(CHECKER) ./testModule$(EXEEXT)
|
||||
$(CHECKER) ./runxmlconf$(EXEEXT) -d $(srcdir)/xmlconf
|
||||
$(CHECKER) ./runsuite$(EXEEXT)
|
||||
if WITH_OUTPUT_SOURCES
|
||||
if WITH_DEBUG_SOURCES
|
||||
test/scripts/test.sh ./xmllint$(EXEEXT)
|
||||
endif
|
||||
if WITH_CATALOG_SOURCES
|
||||
if WITH_OUTPUT_SOURCES
|
||||
ASAN_OPTIONS=detect_leaks=0 test/catalogs/test.sh ./xmlcatalog$(EXEEXT)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -534,19 +534,21 @@ foreach check, deps : checks
|
||||
endif
|
||||
endforeach
|
||||
|
||||
sh = find_program('sh', required: false)
|
||||
if want_output
|
||||
sh = find_program('sh', required: false)
|
||||
|
||||
if sh.found()
|
||||
if sh.found()
|
||||
if want_debug
|
||||
test('xmllint shell', sh,
|
||||
args: [ 'test/scripts/test.sh', xmllint.full_path() ],
|
||||
workdir: meson.current_source_dir())
|
||||
endif
|
||||
if want_catalog and want_output
|
||||
if want_catalog
|
||||
test('xmlcatalog shell', sh,
|
||||
args: [ 'test/catalogs/test.sh', xmlcatalog.full_path() ],
|
||||
workdir: meson.current_source_dir())
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
subdir('example')
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
#include <libxml/parserInternals.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/uri.h>
|
||||
|
||||
#if (defined(LIBXML_RELAXNG_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)) && \
|
||||
defined(LIBXML_XPATH_ENABLED)
|
||||
defined(LIBXML_XPATH_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)
|
||||
#include <libxml/xmlreader.h>
|
||||
|
||||
#include <libxml/xpath.h>
|
||||
|
||||
@@ -621,6 +621,7 @@ testHtmlIds(void) {
|
||||
|
||||
#define MHE "meta http-equiv=\"Content-Type\""
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
static int
|
||||
testHtmlInsertMetaEncoding(void) {
|
||||
/* We currently require a head element to be present. */
|
||||
@@ -741,6 +742,7 @@ testHtmlUpdateMetaEncoding(void) {
|
||||
xmlFreeDoc(doc);
|
||||
return err;
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
static int
|
||||
@@ -806,6 +808,7 @@ testReaderEncoding(void) {
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
static int
|
||||
testReaderContent(void) {
|
||||
xmlTextReader *reader;
|
||||
@@ -840,6 +843,7 @@ testReaderContent(void) {
|
||||
xmlFreeTextReader(reader);
|
||||
return err;
|
||||
}
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
static int
|
||||
testReaderNode(xmlTextReader *reader) {
|
||||
@@ -1424,15 +1428,19 @@ main(void) {
|
||||
#endif
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
err |= testHtmlIds();
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
err |= testHtmlInsertMetaEncoding();
|
||||
err |= testHtmlUpdateMetaEncoding();
|
||||
#endif
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
err |= testHtmlPushWithEncoding();
|
||||
#endif
|
||||
#endif
|
||||
#ifdef LIBXML_READER_ENABLED
|
||||
err |= testReaderEncoding();
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
err |= testReaderContent();
|
||||
#endif
|
||||
err |= testReader();
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
err |= testReaderXIncludeError();
|
||||
|
||||
Reference in New Issue
Block a user