summaryrefslogtreecommitdiff
path: root/tests/general
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2004-03-06 15:11:50 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2004-03-06 15:11:50 +0000
commitefe7443c2b073c7d9f43b559dbcab9f1a93cf8dc (patch)
treeb6e927099b9eefd3e5dae187e0ee5378af24d6f7 /tests/general
parentf11fd0945cbbead3b0e1a2c16c295ce2bdcecc73 (diff)
downloadlibxslt-efe7443c2b073c7d9f43b559dbcab9f1a93cf8dc.tar.gz
libxslt-efe7443c2b073c7d9f43b559dbcab9f1a93cf8dc.tar.bz2
libxslt-efe7443c2b073c7d9f43b559dbcab9f1a93cf8dc.zip
continued interrupt commit for enhanced "make tests"
Diffstat (limited to 'tests/general')
-rw-r--r--tests/general/Makefile.am34
-rw-r--r--tests/general/bug-145.err5
-rw-r--r--tests/general/bug-145.out0
-rw-r--r--tests/general/bug-145.xsl10
-rw-r--r--tests/general/bug-60.err2
5 files changed, 43 insertions, 8 deletions
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index 156caa4f..2d08bee9 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -63,7 +63,7 @@ EXTRA_DIST = \
bug-56.out bug-56.xsl \
bug-57.out bug-57.xsl \
bug-59.out bug-59.xsl \
- bug-60.out bug-60.xsl \
+ bug-60.out bug-60.xsl bug-60.err \
bug-61.out bug-61.xsl \
bug-62-inc.out bug-62-inc.xsl \
bug-62.out bug-62.xsl \
@@ -150,6 +150,7 @@ EXTRA_DIST = \
bug-142.out bug-142.xsl \
bug-143.out bug-143.xsl \
bug-144.out bug-144.xsl \
+ bug-145.out bug-145.xsl bug-145.err \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
@@ -163,8 +164,9 @@ valgrind:
$(MAKE) CHECKER='valgrind -q' tests
test tests: $(top_builddir)/xsltproc/xsltproc
+ @echo '## Running general tests'
@(echo > .memdump)
- @(for i in $(srcdir)/../docs/*.xml ; do \
+ -@(for i in $(srcdir)/../docs/*.xml ; do \
if [ -d $$i ] ; then continue ; fi ; \
doc=`basename $$i .xml` ; \
for j in $(srcdir)/$$doc*.xsl ; do \
@@ -172,11 +174,27 @@ test tests: $(top_builddir)/xsltproc/xsltproc
if [ -d $$j ] ; then continue ; fi ; \
name=`basename $$j .xsl`; \
out=$(srcdir)/"$$name".out; \
- echo Running $$j on $$i ; \
- $(CHECKER) $(top_builddir)/xsltproc/xsltproc $$j $$i > result.$$name;\
- if [ ! -f $$out ] ; then cp result.$$name $$out ; \
- else diff $$out result.$$name; fi ; \
- grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
- rm -f result.$$name ; \
+ err=$(srcdir)/"$$name".err; \
+ log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc $$j $$i \
+ > result.$$name 2>err.$$name; \
+ if [ ! -f $$out ] ; then \
+ cp result.$$name $$out ; \
+ if [ -s err.$$name ] ; then \
+ cp err.$$name $$err ; \
+ fi ; \
+ else \
+ diff $$out result.$$name; \
+ if [ -s $$err ] ; then \
+ diff $$err err.$$name; \
+ else \
+ diff /dev/null err.$$name; \
+ fi ; \
+ fi ; \
+ grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true`;\
+ if [ -n "$$log" ] ; then \
+ echo $$name result ; \
+ echo $$log ; \
+ fi ; \
+ rm -f result.$$name err.$$name; \
done ; done)
diff --git a/tests/general/bug-145.err b/tests/general/bug-145.err
new file mode 100644
index 00000000..25debc41
--- /dev/null
+++ b/tests/general/bug-145.err
@@ -0,0 +1,5 @@
+compilation error: file ./bug-145.xsl line 4 element transform
+xsl:version is missing: document may not be a stylesheet
+runtime error: file ./bug-145.xsl line 6 element call-template
+xsl:call-template : template :a not found
+no result for ./../docs/bug-145.xml
diff --git a/tests/general/bug-145.out b/tests/general/bug-145.out
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/general/bug-145.out
diff --git a/tests/general/bug-145.xsl b/tests/general/bug-145.xsl
new file mode 100644
index 00000000..14061a1d
--- /dev/null
+++ b/tests/general/bug-145.xsl
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+
+<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:a="a">
+ <xsl:template match="/">
+ <xsl:call-template name="a:a"/>
+ </xsl:template>
+</xsl:transform>
+
+
diff --git a/tests/general/bug-60.err b/tests/general/bug-60.err
new file mode 100644
index 00000000..197bb53d
--- /dev/null
+++ b/tests/general/bug-60.err
@@ -0,0 +1,2 @@
+compilation error: file ./bug-60.xsl line 6 element foo-of
+xsltStylePreCompute: unknown xsl:foo-of