Minor modification to force evalution of AVT, otherwise expected error XTDE0030 need not be thrown due to optimizations (empty sequence needs no sorting)
authorabraaksm
Thu, 27 Dec 2018 03:46:28 +0100
changeset 1946 6de9aa12dc4f
parent 1945 3bf05a1d4c18
child 1950 6b901d08b31d
Minor modification to force evalution of AVT, otherwise expected error XTDE0030 need not be thrown due to optimizations (empty sequence needs no sorting)
tests/insn/sort/_sort-test-set.xml
tests/insn/sort/sort-029.xsl
--- a/tests/insn/sort/_sort-test-set.xml	Thu Dec 27 03:45:13 2018 +0100
+++ b/tests/insn/sort/_sort-test-set.xml	Thu Dec 27 03:46:28 2018 +0100
@@ -589,6 +589,7 @@
    <test-case name="sort-029">
       <description>Error, invalid lang attribute, detected dynamically</description>
       <created by="Michael Kay" on="2012-11-07"/>
+      <modified by="Abel Braaksma" on="2018-12-26" change="Forced at least two evaluations, as when xsl:for-each returns zero or one item, the lang='{...}' may never be evaluated and no error is raised" />
       <environment ref="sort123"/>
       <dependencies>
          <spec value="XSLT20+"/>
--- a/tests/insn/sort/sort-029.xsl	Thu Dec 27 03:45:13 2018 +0100
+++ b/tests/insn/sort/sort-029.xsl	Thu Dec 27 03:46:28 2018 +0100
@@ -14,7 +14,7 @@
 
 <xsl:template match="/">
    <out lang="default-order">
-    <xsl:for-each select="//item">
+    <xsl:for-each select="//alpha">
       <xsl:sort select="." data-type="text" lang="'{$lang}'"/>
       <xsl:value-of select="."/>
     </xsl:for-each>