From efe7443c2b073c7d9f43b559dbcab9f1a93cf8dc Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Sat, 6 Mar 2004 15:11:50 +0000 Subject: continued interrupt commit for enhanced "make tests" --- tests/general/Makefile.am | 34 ++++++++++++++++++++++++++-------- tests/general/bug-145.err | 5 +++++ tests/general/bug-145.out | 0 tests/general/bug-145.xsl | 10 ++++++++++ tests/general/bug-60.err | 2 ++ 5 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 tests/general/bug-145.err create mode 100644 tests/general/bug-145.out create mode 100644 tests/general/bug-145.xsl create mode 100644 tests/general/bug-60.err (limited to 'tests/general') 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 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 @@ + + + + + + + + + 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 -- cgit v1.2.3