diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2016-11-17 21:21:33 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2016-11-17 21:21:33 (GMT) |
commit | 8705a471f0cb989dca5bed1ac1aa9c982146ceb0 (patch) | |
tree | c76eb1b28847599af70596ce7adbfd62ca4985f5 /libxslt/tests/xinclude | |
parent | 8d530e150d787e9a74e27592d4e67a496cd922da (diff) | |
parent | 93eaa8f0a22ef3712b9a4bafdc50ba9a7d80ae8f (diff) | |
download | blt-8705a471f0cb989dca5bed1ac1aa9c982146ceb0.zip blt-8705a471f0cb989dca5bed1ac1aa9c982146ceb0.tar.gz blt-8705a471f0cb989dca5bed1ac1aa9c982146ceb0.tar.bz2 |
Merge commit '93eaa8f0a22ef3712b9a4bafdc50ba9a7d80ae8f' as 'libxslt'
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> |