Bug 28415 split test version-023 in a 2.0 and a 3.0 version.
authorabraaksm
Tue, 07 Apr 2015 03:48:00 +0200
changeset 919 e59c1d1a0e6c
parent 918 9f8233561870
child 920 dc38e5bfb780
Bug 28415 split test version-023 in a 2.0 and a 3.0 version.
tests/attr/version/_version-test-set.xml
tests/attr/version/version-023.xsl
tests/attr/version/version-023a.xsl
--- a/tests/attr/version/_version-test-set.xml	Tue Apr 07 03:43:09 2015 +0200
+++ b/tests/attr/version/_version-test-set.xml	Tue Apr 07 03:48:00 2015 +0200
@@ -429,15 +429,39 @@
    </test-case>
 
    <test-case name="version-023">
-      <description>Show that an invalid match pattern is *not* ignored in forwards compatibility mode</description>
-      <keywords>version-attribute XTSE0340 _WRONG:error-condition-allowed-in-3.0 forwards-compatibility-mode</keywords>
+      <description>
+         XSLT20 only
+         Show that an invalid match pattern is *not* ignored in forwards compatibility mode
+      </description>
+      <keywords>version-attribute XTSE0340 forwards-compatibility-mode</keywords>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Abel Braaksma" on="2015-04-06" change="Bug 28415, only applies to version 2.0, see also version-023a for 3.0 version" />
+      <environment ref="ver17"/>
+      <dependencies>
+         <spec value="XSLT20"/>
+      </dependencies>
+      <test>
+         <stylesheet file="version-023.xsl"/>
+      </test>
+      <result>
+         <error code="XTSE0340"/>
+      </result>
+   </test-case>
+
+   <test-case name="version-023a">
+      <description>
+         XSLT 3.0+ version of previous (which incidentally raises the same error for 2.0)
+         Show that an invalid match pattern is *not* ignored in forwards compatibility mode
+         See Bug 28415
+      </description>
+      <keywords>version-attribute XTSE0340 forwards-compatibility-mode</keywords>
+      <created by="Abel Braaksma" on="2015-04-06"/>
       <environment ref="ver17"/>
       <dependencies>
          <spec value="XSLT20+"/>
       </dependencies>
       <test>
-         <stylesheet file="version-023.xsl"/>
+         <stylesheet file="version-023a.xsl"/>
       </test>
       <result>
          <error code="XTSE0340"/>
--- a/tests/attr/version/version-023.xsl	Tue Apr 07 03:43:09 2015 +0200
+++ b/tests/attr/version/version-023.xsl	Tue Apr 07 03:48:00 2015 +0200
@@ -1,6 +1,7 @@
 <xsl:stylesheet version="25.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
-<!-- Show that an invalid match pattern is *not* ignored in forwards
compatibility mode -->
+<!-- Show that an invalid match pattern is *not* ignored in forwards
+compatibility mode -->
 <?spec xslt#forwards?>
 
 <xsl:template match="/(a|b)">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/attr/version/version-023a.xsl	Tue Apr 07 03:48:00 2015 +0200
@@ -0,0 +1,15 @@
+<xsl:stylesheet version="25.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- Show that an invalid match pattern is *not* ignored in forwards
+compatibility mode -->
+<?spec xslt#forwards?>
+
+<xsl:template match="a/preceding-sibling::b[1]">
+  <shouldnt-see-this-element/>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:copy><xsl:apply-templates/></xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file