summaryrefslogtreecommitdiff
path: root/tests/general
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2001-07-07 17:05:02 +0000
committerDaniel Veillard <veillard@src.gnome.org>2001-07-07 17:05:02 +0000
commit6744bd096b0f163a2a54094444b1afe29159d574 (patch)
treed35c25d26bf12e5b59236ab3d0f2964460291335 /tests/general
parent78e30d87ad8703e9db2be937c68dd7ea97cb7071 (diff)
downloadlibxslt-6744bd096b0f163a2a54094444b1afe29159d574.tar.gz
libxslt-6744bd096b0f163a2a54094444b1afe29159d574.tar.bz2
libxslt-6744bd096b0f163a2a54094444b1afe29159d574.zip
- libxslt/templates.c libxslt/transform.c libxslt/transform.h
libxslt/variables.c: big cleanup on the way templates or template fragments are processed, cleanup of stack building - tests/docs/Makefile.am tests/general/Makefile.am tests/general/bug-4[1-8]-* tests/docs/bug-4[1-8]-*: added a series of regression test for the variable/params lookups - libxslt/transform.c libxslt/xsltutils.[ch] libxslt/xsltproc.c: started working on profiling code, there is just invocation counting yet but the framework is in place. Daniel
Diffstat (limited to 'tests/general')
-rw-r--r--tests/general/Makefile.am8
-rw-r--r--tests/general/bug-41-.out2
-rw-r--r--tests/general/bug-41-.xsl18
-rw-r--r--tests/general/bug-42-.out2
-rw-r--r--tests/general/bug-42-.xsl16
-rw-r--r--tests/general/bug-43-.out2
-rw-r--r--tests/general/bug-43-.xsl18
-rw-r--r--tests/general/bug-44-.out2
-rw-r--r--tests/general/bug-44-.xsl19
-rw-r--r--tests/general/bug-45-.out2
-rw-r--r--tests/general/bug-45-.xsl27
-rw-r--r--tests/general/bug-46-.out2
-rw-r--r--tests/general/bug-46-.xsl16
-rw-r--r--tests/general/bug-47-.out2
-rw-r--r--tests/general/bug-47-.xsl18
-rw-r--r--tests/general/bug-48-.out2
-rw-r--r--tests/general/bug-48-.xsl24
17 files changed, 180 insertions, 0 deletions
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index 23166919..61cc87ba 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -46,6 +46,14 @@ EXTRA_DIST = \
bug-38-.out bug-38-.xsl \
bug-39-.out bug-39-.xsl \
bug-40-.out bug-40-.xsl \
+ bug-41-.out bug-41-.xsl \
+ bug-42-.out bug-42-.xsl \
+ bug-43-.out bug-43-.xsl \
+ bug-44-.out bug-44-.xsl \
+ bug-45-.out bug-45-.xsl \
+ bug-46-.out bug-46-.xsl \
+ bug-47-.out bug-47-.xsl \
+ bug-48-.out bug-48-.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-41-.out b/tests/general/bug-41-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-41-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-41-.xsl b/tests/general/bug-41-.xsl
new file mode 100644
index 00000000..26b744bc
--- /dev/null
+++ b/tests/general/bug-41-.xsl
@@ -0,0 +1,18 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:variable name="foo" select="'FAILURE'"/>
+
+<xsl:template name="test">
+<xsl:value-of select="$foo"/>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo" select="'FAILURE'"/>
+<xsl:call-template name="test">
+ <xsl:with-param name="foo" select="'SUCCESS'"/>
+</xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/general/bug-42-.out b/tests/general/bug-42-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-42-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-42-.xsl b/tests/general/bug-42-.xsl
new file mode 100644
index 00000000..a14a5c5a
--- /dev/null
+++ b/tests/general/bug-42-.xsl
@@ -0,0 +1,16 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:variable name="foo" select="'SUCCESS'"/>
+
+<xsl:template match="doc">
+<xsl:value-of select="$foo"/>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo" select="'FAILURE'"/>
+<xsl:apply-templates/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/general/bug-43-.out b/tests/general/bug-43-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-43-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-43-.xsl b/tests/general/bug-43-.xsl
new file mode 100644
index 00000000..551ed239
--- /dev/null
+++ b/tests/general/bug-43-.xsl
@@ -0,0 +1,18 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:variable name="foo" select="'FAILURE'"/>
+
+<xsl:template match="doc">
+<xsl:value-of select="$foo"/>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo" select="'FAILURE'"/>
+<xsl:apply-templates>
+ <xsl:with-param name="foo" select="'SUCCESS'"/>
+</xsl:apply-templates>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/general/bug-44-.out b/tests/general/bug-44-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-44-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-44-.xsl b/tests/general/bug-44-.xsl
new file mode 100644
index 00000000..a6916dc1
--- /dev/null
+++ b/tests/general/bug-44-.xsl
@@ -0,0 +1,19 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:variable name="foo" select="'FAILURE'"/>
+
+<xsl:template name="test">
+<xsl:param name="foo" select="'FAILURE'"/>
+<xsl:value-of select="$foo"/>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo" select="'FAILURE'"/>
+<xsl:call-template name="test">
+ <xsl:with-param name="foo" select="'SUCCESS'"/>
+</xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/general/bug-45-.out b/tests/general/bug-45-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-45-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-45-.xsl b/tests/general/bug-45-.xsl
new file mode 100644
index 00000000..b8cbcb54
--- /dev/null
+++ b/tests/general/bug-45-.xsl
@@ -0,0 +1,27 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:variable name="foo" select="'1'"/>
+
+<xsl:template name="test">
+<xsl:param name="foo" select="'2'"/>
+<xsl:choose>
+ <xsl:when test="$foo = '0'">
+ <xsl:text>SUCCESS</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>FAILURE </xsl:text>
+ <xsl:value-of select="$foo"/>
+ </xsl:otherwise>
+</xsl:choose>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo" select="'3'"/>
+<xsl:call-template name="test">
+ <xsl:with-param name="foo" select="'0'"/>
+</xsl:call-template>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/general/bug-46-.out b/tests/general/bug-46-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-46-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-46-.xsl b/tests/general/bug-46-.xsl
new file mode 100644
index 00000000..ed104b34
--- /dev/null
+++ b/tests/general/bug-46-.xsl
@@ -0,0 +1,16 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:template name="test">
+<xsl:text>SUCCESS</xsl:text>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo">
+<xsl:call-template name="test"/>
+</xsl:variable>
+<xsl:value-of select="$foo"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/general/bug-47-.out b/tests/general/bug-47-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-47-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-47-.xsl b/tests/general/bug-47-.xsl
new file mode 100644
index 00000000..60f11bb9
--- /dev/null
+++ b/tests/general/bug-47-.xsl
@@ -0,0 +1,18 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:template name="test">
+<xsl:text>SUCCESS</xsl:text>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo">
+<xsl:call-template name="test"/>
+</xsl:variable>
+<xsl:if test="1">
+<xsl:value-of select="$foo"/>
+</xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/tests/general/bug-48-.out b/tests/general/bug-48-.out
new file mode 100644
index 00000000..40513561
--- /dev/null
+++ b/tests/general/bug-48-.out
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+SUCCESS
diff --git a/tests/general/bug-48-.xsl b/tests/general/bug-48-.xsl
new file mode 100644
index 00000000..b99df69e
--- /dev/null
+++ b/tests/general/bug-48-.xsl
@@ -0,0 +1,24 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'>
+
+<xsl:template name="empty">
+</xsl:template>
+
+<xsl:template name="test">
+<xsl:text>SUCCESS</xsl:text>
+</xsl:template>
+
+<xsl:template match="/">
+<xsl:variable name="foo">
+<xsl:call-template name="test"/>
+</xsl:variable>
+<xsl:if test="1">
+<xsl:apply-templates select="doc" name="empty">
+<xsl:with-param name="unused" select="$foo"/>
+</xsl:apply-templates>
+</xsl:if>
+<xsl:value-of select="$foo"/>
+</xsl:template>
+
+</xsl:stylesheet>