diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 13 | ||||
-rw-r--r-- | tests/plugins/plugin.out | 3 | ||||
-rw-r--r-- | tests/plugins/plugin.xml | 1 | ||||
-rw-r--r-- | tests/plugins/plugin.xsl | 12 |
4 files changed, 29 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 8fd4e8b5..32e22e3c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,6 +12,7 @@ all: # and (if errors are expected) in *.err test tests: @(cur=`pwd` ; for dir in $(SUBDIRS) ; do cd $$dir ; $(MAKE) CHECKER='$(CHECKER)' tests ; cd $$cur ; done) + $(MAKE) plugin_tests valgrind: @echo '## Running the regression tests under Valgrind' @@ -23,3 +24,15 @@ full: tests docbook_tests docbook_tests: @(cd docbook ; $(MAKE) full) +if WITH_MODULES + +plugin_tests: + @echo Running the plugin tests... + @(cd plugins && LIBXSLT_PLUGINS_PATH=. $(top_builddir)/../xsltproc/xsltproc plugin.xsl plugin.xml) + +else + +plugin_tests: + @echo Skipping the plugin tests. + +endif diff --git a/tests/plugins/plugin.out b/tests/plugins/plugin.out new file mode 100644 index 00000000..c5235455 --- /dev/null +++ b/tests/plugins/plugin.out @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<!--libxslt:testplugin element test worked--> +SUCCESS diff --git a/tests/plugins/plugin.xml b/tests/plugins/plugin.xml new file mode 100644 index 00000000..69d62f2c --- /dev/null +++ b/tests/plugins/plugin.xml @@ -0,0 +1 @@ +<doc/> diff --git a/tests/plugins/plugin.xsl b/tests/plugins/plugin.xsl new file mode 100644 index 00000000..0203d230 --- /dev/null +++ b/tests/plugins/plugin.xsl @@ -0,0 +1,12 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:libxslt="http://xmlsoft.org/xslt/testplugin" + xmlns:test="http://xmlsoft.org/xslt/testplugin" + xsl:extension-element-prefixes="libxslt test" + version='1.0'> +<!-- the prefix is registered twice to check single initialization --> +<xsl:template match="/"> +<libxslt:testplugin/> +<xsl:value-of select="libxslt:testplugin('SUCCESS')"/> +</xsl:template> +</xsl:stylesheet> |