From ed0f60dea291f7ef39a33f5e815f8ba90a72a90d Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Sat, 13 Jan 2001 22:29:51 +0000 Subject: More general work, added for-each: - test/Makefile.am test/REC*/Makefile.am: added first test - libxslt/pattern.c libxslt/transform.c libxslt/xslt.c: cleanup of nodes at reading of stylesheet, added support for xsl:for-each and fixed a few recursion bugs Daniel --- tests/Makefile.am | 4 ++++ tests/REC1/Makefile.am | 13 +++++++++++++ tests/REC1/result.xml | 28 +++++++++++++--------------- tests/REC2/Makefile.am | 13 +++++++++++++ 4 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 tests/REC1/Makefile.am create mode 100644 tests/REC2/Makefile.am (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 083886fc..f682102d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,3 +17,7 @@ LDADDS = $(top_builddir)/libxslt/libxslt.la $(LIBXML_LIBS) #testevents_LDFLAGS = #testevents_DEPENDENCIES = $(DEPS) #testevents_LDADD = $(LDADDS) + +test: $(top_builddir)/libxslt/xsltproc + @(cd REC1 ; make test) + @(cd REC2 ; make test) diff --git a/tests/REC1/Makefile.am b/tests/REC1/Makefile.am new file mode 100644 index 00000000..a01976aa --- /dev/null +++ b/tests/REC1/Makefile.am @@ -0,0 +1,13 @@ +## Process this file with automake to produce Makefile.in + +$(top_builddir)/libxslt/xsltproc: + @(cd ../../libxslt ; make xsltproc) + +test: $(top_builddir)/libxslt/xsltproc + @(rm -f .memdump ; touch .memdump) + @($(top_builddir)/libxslt/xsltproc doc.xsl doc.xml > doc.res ; \ + diff result.xml doc.res ; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ + rm -f doc.res) + + diff --git a/tests/REC1/result.xml b/tests/REC1/result.xml index 4504627e..4e7836b3 100644 --- a/tests/REC1/result.xml +++ b/tests/REC1/result.xml @@ -1,18 +1,16 @@ - -Document Title - - -

Document Title

-

Chapter Title

-

Section Title

-

This is a test.

-

-NOTE: This is a note.

-

Another Section Title

-

This is another test.

-

-NOTE: This is another note.

- + + Document Title + + +

Document Title

+

Chapter Title

+

Section Title

+

This is a test.

+

NOTE: This is a note.

+

Another Section Title

+

This is another test.

+

NOTE: This is another note.

+ diff --git a/tests/REC2/Makefile.am b/tests/REC2/Makefile.am new file mode 100644 index 00000000..a01976aa --- /dev/null +++ b/tests/REC2/Makefile.am @@ -0,0 +1,13 @@ +## Process this file with automake to produce Makefile.in + +$(top_builddir)/libxslt/xsltproc: + @(cd ../../libxslt ; make xsltproc) + +test: $(top_builddir)/libxslt/xsltproc + @(rm -f .memdump ; touch .memdump) + @($(top_builddir)/libxslt/xsltproc doc.xsl doc.xml > doc.res ; \ + diff result.xml doc.res ; \ + grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\ + rm -f doc.res) + + -- cgit v1.2.3