summaryrefslogtreecommitdiff
path: root/tests/general
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2004-11-21 02:09:34 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2004-11-21 02:09:34 +0000
commitded18bc6c2c1b9f3b77a2477b204076b24684b55 (patch)
tree154799af793233e07c868ceff33931850807e208 /tests/general
parent01d362a38d6292e328253b0a7df2cb35a7e9d433 (diff)
downloadlibxslt-ded18bc6c2c1b9f3b77a2477b204076b24684b55.tar.gz
libxslt-ded18bc6c2c1b9f3b77a2477b204076b24684b55.tar.bz2
libxslt-ded18bc6c2c1b9f3b77a2477b204076b24684b55.zip
enhanced code to assure the "current template rule" is not changed by
* libxslt/transform.c: enhanced code to assure the "current template rule" is not changed by xsl:call-template (bug 157859). * tests/general/bug-156.*, tests/general/Makefile.am, tests/docs/bug-156.*, tests/docs/Makefile.am: added a test case
Diffstat (limited to 'tests/general')
-rw-r--r--tests/general/Makefile.am2
-rw-r--r--tests/general/bug-156.err2
-rw-r--r--tests/general/bug-156.imp1.imp16
-rw-r--r--tests/general/bug-156.imp2.imp10
-rw-r--r--tests/general/bug-156.out0
-rw-r--r--tests/general/bug-156.xsl12
6 files changed, 42 insertions, 0 deletions
diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am
index 4da74936..afd03208 100644
--- a/tests/general/Makefile.am
+++ b/tests/general/Makefile.am
@@ -163,6 +163,8 @@ EXTRA_DIST = \
bug-153.out bug-153.xsl \
bug-154.out bug-154.xsl \
bug-155.out bug-155.xsl \
+ bug-156.err bug-156.out bug-156.xsl \
+ bug-156.imp1.imp bug-156.imp2.imp \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-156.err b/tests/general/bug-156.err
new file mode 100644
index 00000000..b51f3937
--- /dev/null
+++ b/tests/general/bug-156.err
@@ -0,0 +1,2 @@
+From main
+From second import
diff --git a/tests/general/bug-156.imp1.imp b/tests/general/bug-156.imp1.imp
new file mode 100644
index 00000000..60b0ae3f
--- /dev/null
+++ b/tests/general/bug-156.imp1.imp
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="bug-156.imp2.imp"/>
+
+<xsl:template name="message">
+ <xsl:message>From first import</xsl:message>
+ <xsl:apply-imports/>
+</xsl:template>
+
+<xsl:template match="/">
+ <xsl:call-template name="message"/>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/tests/general/bug-156.imp2.imp b/tests/general/bug-156.imp2.imp
new file mode 100644
index 00000000..2938f70e
--- /dev/null
+++ b/tests/general/bug-156.imp2.imp
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:template match="/">
+ <xsl:message>From second import</xsl:message>
+ <xsl:apply-imports/>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/tests/general/bug-156.out b/tests/general/bug-156.out
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/general/bug-156.out
diff --git a/tests/general/bug-156.xsl b/tests/general/bug-156.xsl
new file mode 100644
index 00000000..6c69f9fa
--- /dev/null
+++ b/tests/general/bug-156.xsl
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:import href="bug-156.imp1.imp"/>
+
+<xsl:template name="message">
+ <xsl:message>From main</xsl:message>
+ <xsl:apply-imports/>
+</xsl:template>
+
+</xsl:stylesheet>
+