summaryrefslogtreecommitdiff
path: root/tests/documents
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-01-14 13:25:52 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-01-14 13:25:52 +0000
commit66cea913b7ded85da8bea5add49d2bfa6a311e97 (patch)
treea2c3e845850d69390e8abaa73291d8bc6db858ed /tests/documents
parentcb20183b4415c6e8b8bddf2ce113579c31a72527 (diff)
downloadlibxslt-66cea913b7ded85da8bea5add49d2bfa6a311e97.tar.gz
libxslt-66cea913b7ded85da8bea5add49d2bfa6a311e97.tar.bz2
libxslt-66cea913b7ded85da8bea5add49d2bfa6a311e97.zip
fixed #101502 by applying and cleaning up the associated patch from Daniel
* libxslt/functions.c: fixed #101502 by applying and cleaning up the associated patch from Daniel Stodden. * tests/documents/Makefile.am tests/documents/fragment*: added a specific test. Daniel
Diffstat (limited to 'tests/documents')
-rw-r--r--tests/documents/Makefile.am4
-rw-r--r--tests/documents/fragment.result2
-rw-r--r--tests/documents/fragment.xml1
-rw-r--r--tests/documents/fragment.xsl12
-rw-r--r--tests/documents/fragment2.xml3
5 files changed, 22 insertions, 0 deletions
diff --git a/tests/documents/Makefile.am b/tests/documents/Makefile.am
index fdee3953..3c89e2b5 100644
--- a/tests/documents/Makefile.am
+++ b/tests/documents/Makefile.am
@@ -30,4 +30,8 @@ test tests: $(top_builddir)/xsltproc/xsltproc
diff $(srcdir)/message.result result; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
rm -f result)
+ @($(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/fragment.xsl $(srcdir)/fragment.xml > result 2>&1 ; \
+ diff $(srcdir)/fragment.result result; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
+ rm -f result)
diff --git a/tests/documents/fragment.result b/tests/documents/fragment.result
new file mode 100644
index 00000000..2c4565b4
--- /dev/null
+++ b/tests/documents/fragment.result
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<doc><p>hello</p></doc>
diff --git a/tests/documents/fragment.xml b/tests/documents/fragment.xml
new file mode 100644
index 00000000..69d62f2c
--- /dev/null
+++ b/tests/documents/fragment.xml
@@ -0,0 +1 @@
+<doc/>
diff --git a/tests/documents/fragment.xsl b/tests/documents/fragment.xsl
new file mode 100644
index 00000000..439063ae
--- /dev/null
+++ b/tests/documents/fragment.xsl
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<xsl:template match="/">
+ <doc>
+ <xsl:copy-of select="document('fragment2.xml#xpointer(//p[1])')"/>
+ </doc>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/tests/documents/fragment2.xml b/tests/documents/fragment2.xml
new file mode 100644
index 00000000..fa21f68c
--- /dev/null
+++ b/tests/documents/fragment2.xml
@@ -0,0 +1,3 @@
+<test><doc><p>hello</p>
+<title>foo</title>
+<p>goodbye</p></doc></test>