summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-09-18 09:56:57 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-09-18 09:56:57 +0000
commiteb5f21553c13a591f2e48d95bd4505941f51db8b (patch)
treee5c186cfe5124c3c2539d7f5c8b7ccfcc2d8583a /tests
parent2db3204c7d21e52f64801dfbd28449c843893cb0 (diff)
downloadlibxslt-eb5f21553c13a591f2e48d95bd4505941f51db8b.tar.gz
libxslt-eb5f21553c13a591f2e48d95bd4505941f51db8b.tar.bz2
libxslt-eb5f21553c13a591f2e48d95bd4505941f51db8b.zip
fixed bug #60624 improver the error context reporting added a specific
* libxslt/xslt.c: fixed bug #60624 * libxslt/xsltutils.c: improver the error context reporting * tests/reports/Makefile.am tests/reports/tst-2.*: added a specific regression test * xsltproc/xsltproc: free the stylesheet if it contained an error. Daniel
Diffstat (limited to 'tests')
-rw-r--r--tests/reports/Makefile.am5
-rw-r--r--tests/reports/tst-2.err6
-rw-r--r--tests/reports/tst-2.out0
-rw-r--r--tests/reports/tst-2.xml1
-rw-r--r--tests/reports/tst-2.xsl10
5 files changed, 20 insertions, 2 deletions
diff --git a/tests/reports/Makefile.am b/tests/reports/Makefile.am
index 75a4f29b..81682492 100644
--- a/tests/reports/Makefile.am
+++ b/tests/reports/Makefile.am
@@ -4,7 +4,8 @@ $(top_builddir)/xsltproc/xsltproc:
@(cd ../../xsltproc ; $(MAKE) xsltproc)
EXTRA_DIST = \
- tst-1.xml tst-1.xsl tst-1.out tst-1.err
+ tst-1.xml tst-1.xsl tst-1.out tst-1.err \
+ tst-2.xml tst-2.xsl tst-2.out tst-2.err
all: test
@@ -14,7 +15,7 @@ test tests: $(top_builddir)/xsltproc/xsltproc
@(for i in $(srcdir)/*.xml ; do \
if [ -d $$i ] ; then continue ; fi ; \
doc=`basename $$i .xml` ; \
- for j in $(srcdir)/$$doc*.xsl ; do \
+ for j in $(srcdir)/$$doc.xsl ; do \
if [ ! -f $$j ] ; then continue ; fi ; \
if [ -d $$j ] ; then continue ; fi ; \
name=`basename $$j .xsl`; \
diff --git a/tests/reports/tst-2.err b/tests/reports/tst-2.err
new file mode 100644
index 00000000..d144c491
--- /dev/null
+++ b/tests/reports/tst-2.err
@@ -0,0 +1,6 @@
+compilation error: file ./tst-2.xsl line 2 element text
+misplaced text element: '
+
+a not allowed top level element
+
+'
diff --git a/tests/reports/tst-2.out b/tests/reports/tst-2.out
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/reports/tst-2.out
diff --git a/tests/reports/tst-2.xml b/tests/reports/tst-2.xml
new file mode 100644
index 00000000..69d62f2c
--- /dev/null
+++ b/tests/reports/tst-2.xml
@@ -0,0 +1 @@
+<doc/>
diff --git a/tests/reports/tst-2.xsl b/tests/reports/tst-2.xsl
new file mode 100644
index 00000000..98fa6c9f
--- /dev/null
+++ b/tests/reports/tst-2.xsl
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+a not allowed top level element
+
+<xsl:template match="/">
+
+</xsl:template>
+</xsl:stylesheet>
+