added regression test for bug #469410
authorWilliam M. Brack <wbrack@src.gnome.org>
Thu, 23 Aug 2007 13:14:55 +0000 (13:14 +0000)
committerWilliam M. Brack <wbrack@src.gnome.org>
Thu, 23 Aug 2007 13:14:55 +0000 (13:14 +0000)
* tests/general/bug-165.[xsl,out,err], tests/docs/bug-165.xml,
  tests/general/Makefile.am, tests/docs/Makefile.am:
  added regression test for bug #469410

svn path=/trunk/; revision=1439

ChangeLog
tests/docs/Makefile.am
tests/docs/bug-165.xml [new file with mode: 0644]
tests/general/Makefile.am
tests/general/bug-165.err [new file with mode: 0644]
tests/general/bug-165.out [new file with mode: 0644]
tests/general/bug-165.xsl [new file with mode: 0644]

index f9ae218..883fd64 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Aug 23 21:15:28 HKT 2007 William Brack <wbrack@mmm.com.hk>
+
+       * tests/general/bug-165.[xsl,out,err], tests/docs/bug-165.xml,
+         tests/general/Makefile.am, tests/docs/Makefile.am:
+         added regression test for bug #469410
+
 Thu Aug 23 14:13:02 CEST 2007 Daniel Veillard <daniel@veillard.com>
 
        * xsltproc/xsltproc.c: patch from Drazen Kacar to add a --encoding
index a801453..559f554 100644 (file)
@@ -163,6 +163,7 @@ EXTRA_DIST =        \
        bug-161.xml \
        bug-163.xml \
        bug-164.xml \
+       bug-165.xml \
        character.xml \
        array.xml \
        items.xml
diff --git a/tests/docs/bug-165.xml b/tests/docs/bug-165.xml
new file mode 100644 (file)
index 0000000..7c2846b
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">\r
+<body>\r
+<p><pPr><pStyle val="Quick1"/><tabs><tab val="left" pos="-1080"/><tab val="left" pos="-720"/><tab val="left" pos="0"/><tab val="num" pos="450"/><tab val="left" pos="1170"/><tab val="left" pos="1440"/><tab val="left" pos="2160"/><tab val="left" pos="2880"/><tab val="left" pos="3600"/><tab val="left" pos="4320"/><tab val="left" pos="5040"/><tab val="left" pos="5760"/><tab val="left" pos="6480"/><tab val="left" pos="7200"/><tab val="left" pos="7920"/><tab val="left" pos="8640"/><tab val="left" pos="9360"/></tabs><spacing line="242" lineRule="auto"/></pPr><r><t>1</t></r></p>\r
+<p><pPr><pStyle val="Quick1"/><tabs><tab val="left" pos="-1080"/><tab val="left" pos="-720"/><tab val="left" pos="0"/><tab val="num" pos="450"/><tab val="left" pos="1170"/><tab val="left" pos="1440"/><tab val="left" pos="2160"/><tab val="left" pos="2880"/><tab val="left" pos="3600"/><tab val="left" pos="4320"/><tab val="left" pos="5040"/><tab val="left" pos="5760"/><tab val="left" pos="6480"/><tab val="left" pos="7200"/><tab val="left" pos="7920"/><tab val="left" pos="8640"/><tab val="left" pos="9360"/></tabs><spacing line="242" lineRule="auto"/></pPr><r><t>2</t></r></p>\r
+</body>\r
+<styles>\r
+<style type="paragraph" customStyle="1" styleId="Quick1"><name val="Quick 1."/><basedOn val="Normal"/><uiPriority val="99"/><rsid val="0036577A"/><pPr><numPr><numId val="1"/></numPr><ind left="450" hanging="450"/></pPr></style>\r
+</styles>\r
+</document>\r
index 618b23a..b965506 100644 (file)
@@ -172,6 +172,7 @@ EXTRA_DIST = \
     bug-161.out bug-161.xsl \
     bug-163.out bug-163.xsl \
     bug-164.out bug-164.xsl \
+    bug-165.out bug-165.xsl bug-145.err \
     character.out character.xsl \
     character2.out character2.xsl \
     itemschoose.out itemschoose.xsl \
diff --git a/tests/general/bug-165.err b/tests/general/bug-165.err
new file mode 100644 (file)
index 0000000..d7564e2
--- /dev/null
@@ -0,0 +1,4 @@
+runtime error: file ./bug-165.xsl line 6 element value-of
+Variable 'pStyle' has not been declared.
+runtime error: file ./bug-165.xsl line 6 element value-of
+XPath evaluation returned no result.
diff --git a/tests/general/bug-165.out b/tests/general/bug-165.out
new file mode 100644 (file)
index 0000000..0d7d44b
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+
+
+
+
+
+
+
diff --git a/tests/general/bug-165.xsl b/tests/general/bug-165.xsl
new file mode 100644 (file)
index 0000000..d4573a9
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" ?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
+
+<xsl:template match="p">
+<xsl:value-of select="preceding-sibling::p[not(pPr/pStyle = $pStyle)][1]/preceding-sibling::p/pPr/pStyle"/>
+</xsl:template>
+
+</xsl:stylesheet>