diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-05-03 15:29:42 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-05-03 15:29:42 (GMT) |
commit | 937cfaf1a06a4a9d0c8ba119d7ce820878ff9058 (patch) | |
tree | f7b0b1bcce9ae963a0a069eafa552350eb4ee391 /libxslt/tests/xinclude | |
parent | 4b8453f0303492a1de2dcf854555f6429fac550e (diff) | |
download | blt-937cfaf1a06a4a9d0c8ba119d7ce820878ff9058.zip blt-937cfaf1a06a4a9d0c8ba119d7ce820878ff9058.tar.gz blt-937cfaf1a06a4a9d0c8ba119d7ce820878ff9058.tar.bz2 |
inital commit
Diffstat (limited to 'libxslt/tests/xinclude')
-rw-r--r-- | libxslt/tests/xinclude/Makefile.am | 33 | ||||
-rw-r--r-- | libxslt/tests/xinclude/e.xml | 2 | ||||
-rw-r--r-- | libxslt/tests/xinclude/e.xsl | 14 | ||||
-rw-r--r-- | libxslt/tests/xinclude/normal.out | 5 | ||||
-rw-r--r-- | libxslt/tests/xinclude/x1.xml | 5 | ||||
-rw-r--r-- | libxslt/tests/xinclude/x2.xml | 4 | ||||
-rw-r--r-- | libxslt/tests/xinclude/xinclude.out | 7 |
7 files changed, 70 insertions, 0 deletions
diff --git a/libxslt/tests/xinclude/Makefile.am b/libxslt/tests/xinclude/Makefile.am new file mode 100644 index 0000000..3562454 --- /dev/null +++ b/libxslt/tests/xinclude/Makefile.am @@ -0,0 +1,33 @@ +## Process this file with automake to produce Makefile.in + +$(top_builddir)/xsltproc/xsltproc: + @(cd ../../xsltproc ; $(MAKE) xsltproc) + +EXTRA_DIST = \ + e.xml \ + e.xsl \ + x1.xml \ + x2.xml \ + normal.out \ + xinclude.out + +CLEANFILES = .memdump + +valgrind: + @echo '## Running the regression tests under Valgrind' + $(MAKE) CHECKER='libtool --mode=execute valgrind -q --leak-check=full' tests + +test tests: $(top_builddir)/xsltproc/xsltproc + @echo '## Running XInclude test' + @(echo > .memdump) + @($(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/e.xsl $(srcdir)/e.xml > res ; \ + diff $(srcdir)/normal.out res; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\ + rm -f res) + @($(CHECKER) $(top_builddir)/xsltproc/xsltproc --xinclude $(srcdir)/e.xsl $(srcdir)/e.xml > res ; \ + diff $(srcdir)/xinclude.out res; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\ + rm -f res) + + + diff --git a/libxslt/tests/xinclude/e.xml b/libxslt/tests/xinclude/e.xml new file mode 100644 index 0000000..a3ab387 --- /dev/null +++ b/libxslt/tests/xinclude/e.xml @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<e/> diff --git a/libxslt/tests/xinclude/e.xsl b/libxslt/tests/xinclude/e.xsl new file mode 100644 index 0000000..eb56f0f --- /dev/null +++ b/libxslt/tests/xinclude/e.xsl @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates select="document('x1.xml')/foo"/> + </xsl:template> + + <xsl:template match="*|@*|text()"> + <xsl:copy><xsl:apply-templates select="*|@*| +text()" /></xsl:copy> + </xsl:template> + +</xsl:stylesheet> diff --git a/libxslt/tests/xinclude/normal.out b/libxslt/tests/xinclude/normal.out new file mode 100644 index 0000000..b7f37c0 --- /dev/null +++ b/libxslt/tests/xinclude/normal.out @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<foo> + <element>x1</element> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="x2.xml"/> +</foo> diff --git a/libxslt/tests/xinclude/x1.xml b/libxslt/tests/xinclude/x1.xml new file mode 100644 index 0000000..a64b15b --- /dev/null +++ b/libxslt/tests/xinclude/x1.xml @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<foo> + <element>x1</element> + <xi:include href="x2.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> +</foo> diff --git a/libxslt/tests/xinclude/x2.xml b/libxslt/tests/xinclude/x2.xml new file mode 100644 index 0000000..6a319d1 --- /dev/null +++ b/libxslt/tests/xinclude/x2.xml @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<foo> + <element>x2</element> +</foo> diff --git a/libxslt/tests/xinclude/xinclude.out b/libxslt/tests/xinclude/xinclude.out new file mode 100644 index 0000000..046d0db --- /dev/null +++ b/libxslt/tests/xinclude/xinclude.out @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<foo> + <element>x1</element> + <foo> + <element>x2</element> +</foo> +</foo> |