New test case for a Saxon bug condition
authorMichael Kay <mike@saxonica.com>
Tue, 11 Aug 2015 17:59:12 +0100
changeset 1026 238fd578d417
parent 1025 17b24d9f546b
child 1027 ab952335df2b
New test case for a Saxon bug condition
tests/expr/math/_math-test-set.xml
tests/expr/math/math-0106.xsl
--- a/tests/expr/math/_math-test-set.xml	Tue Aug 11 17:58:16 2015 +0100
+++ b/tests/expr/math/_math-test-set.xml	Tue Aug 11 17:59:12 2015 +0100
@@ -377,6 +377,21 @@
   </out>]]></assert-xml>
       </result>
    </test-case>
+   
+   <test-case name="math-0106">
+      <description>Failure to compare empty string to number</description>
+      <created by="Michael Kay" on="2015-07-30"/>
+      <environment ref="math-01"/>
+      <dependencies>
+         <spec value="XSLT20+"/>
+      </dependencies>
+      <test>
+         <stylesheet file="math-0106.xsl"/>
+      </test>
+      <result>
+         <error code="FORG0001"/>
+      </result>
+   </test-case>
 
    <test-case name="math-0201">
       <description>Test of floor().</description>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/expr/math/math-0106.xsl	Tue Aug 11 17:59:12 2015 +0100
@@ -0,0 +1,7 @@
+<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!-- Failure to convert empty string to number -->
+  <xsl:template match="/">
+    <xsl:variable name="doc" as="element()+"><a/><b/><c/></xsl:variable>   
+    <xsl:sequence select="$doc = 3"/>
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file