expand-sequence: Update tests for recent changes
This should have been part of a previous commit. So few parts of the system utilize tests that I didn't notice that this was failing until after the commit, since I'm not used to running them...even though I wrote them. This system is being replaced with TAMER, so these changes largely just get the tests working properly again. DEV-15095main
parent
0b04807cfd
commit
c1770d39ff
|
@ -46,8 +46,8 @@
|
||||||
|
|
||||||
<variable name="foo:expanded" as="element( foo:seq )">
|
<variable name="foo:expanded" as="element( foo:seq )">
|
||||||
<foo:seq foo="baz">
|
<foo:seq foo="baz">
|
||||||
<sequence select="eseq:expand-node( $foo:a/foo:node[1] ),
|
<sequence select="eseq:expand-node( (), $foo:a/foo:node[1] ),
|
||||||
eseq:expand-node( $foo:a/foo:node[2] )" />
|
eseq:expand-node( (), $foo:a/foo:node[2] )" />
|
||||||
</foo:seq>
|
</foo:seq>
|
||||||
</variable>
|
</variable>
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@
|
||||||
|
|
||||||
<function name="eseq:expand-node" as="node()*"
|
<function name="eseq:expand-node" as="node()*"
|
||||||
override="yes">
|
override="yes">
|
||||||
|
<param name="context" />
|
||||||
<param name="node" as="node()" />
|
<param name="node" as="node()" />
|
||||||
|
|
||||||
<choose>
|
<choose>
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
<scenario label="Pass on an expansion sequence">
|
<scenario label="Pass on an expansion sequence">
|
||||||
<scenario label="with an empty sequence">
|
<scenario label="with an empty sequence">
|
||||||
<call function="eseq:expand-step">
|
<call function="eseq:expand-step">
|
||||||
|
<param name="context"
|
||||||
|
select="()" />
|
||||||
<param name="eseq"
|
<param name="eseq"
|
||||||
select="$foo:empty-eseq" />
|
select="$foo:empty-eseq" />
|
||||||
</call>
|
</call>
|
||||||
|
@ -43,6 +45,8 @@
|
||||||
|
|
||||||
<scenario label="with no sequence">
|
<scenario label="with no sequence">
|
||||||
<call function="eseq:expand-step">
|
<call function="eseq:expand-step">
|
||||||
|
<param name="context"
|
||||||
|
select="()" />
|
||||||
<param name="eseq"
|
<param name="eseq"
|
||||||
select="()" />
|
select="()" />
|
||||||
</call>
|
</call>
|
||||||
|
@ -54,6 +58,8 @@
|
||||||
|
|
||||||
<scenario label="with an expansion element">
|
<scenario label="with an expansion element">
|
||||||
<call function="eseq:expand-step">
|
<call function="eseq:expand-step">
|
||||||
|
<param name="context"
|
||||||
|
select="()" />
|
||||||
<param name="eseq"
|
<param name="eseq"
|
||||||
select="$foo:a" />
|
select="$foo:a" />
|
||||||
</call>
|
</call>
|
||||||
|
@ -73,9 +79,12 @@
|
||||||
<scenario label="with an expanded node">
|
<scenario label="with an expanded node">
|
||||||
<!-- notice the additional expand-step calls -->
|
<!-- notice the additional expand-step calls -->
|
||||||
<call function="eseq:expand-step">
|
<call function="eseq:expand-step">
|
||||||
|
<param name="context"
|
||||||
|
select="()" />
|
||||||
<param name="eseq"
|
<param name="eseq"
|
||||||
select="eseq:expand-step(
|
select="eseq:expand-step(
|
||||||
eseq:expand-step( $foo:a ) )" />
|
(),
|
||||||
|
eseq:expand-step( (), $foo:a ) )" />
|
||||||
</call>
|
</call>
|
||||||
|
|
||||||
<expect label="hoists expanded element out of sequence"
|
<expect label="hoists expanded element out of sequence"
|
||||||
|
@ -92,9 +101,12 @@
|
||||||
<scenario label="with nodes still pending expansion">
|
<scenario label="with nodes still pending expansion">
|
||||||
<!-- notice the additional expand-step calls -->
|
<!-- notice the additional expand-step calls -->
|
||||||
<call function="eseq:expand-step">
|
<call function="eseq:expand-step">
|
||||||
|
<param name="context"
|
||||||
|
select="()" />
|
||||||
<param name="eseq"
|
<param name="eseq"
|
||||||
select="eseq:expand-step(
|
select="eseq:expand-step(
|
||||||
eseq:expand-step( $foo:unexpandable ) )" />
|
(),
|
||||||
|
eseq:expand-step( (), $foo:unexpandable ) )" />
|
||||||
</call>
|
</call>
|
||||||
|
|
||||||
<!-- if this fails, then our is-expanded predicate is not being
|
<!-- if this fails, then our is-expanded predicate is not being
|
||||||
|
@ -107,9 +119,11 @@
|
||||||
|
|
||||||
<scenario label="Pass on expansion sequence with hoisted node">
|
<scenario label="Pass on expansion sequence with hoisted node">
|
||||||
<variable name="foo:hoisted"
|
<variable name="foo:hoisted"
|
||||||
select="eseq:expand-step( $foo:expanded )" />
|
select="eseq:expand-step( (), $foo:expanded )" />
|
||||||
|
|
||||||
<call function="eseq:expand-step">
|
<call function="eseq:expand-step">
|
||||||
|
<param name="context"
|
||||||
|
select="()" />
|
||||||
<param name="eseq"
|
<param name="eseq"
|
||||||
select="$foo:hoisted" />
|
select="$foo:hoisted" />
|
||||||
</call>
|
</call>
|
||||||
|
@ -128,6 +142,6 @@
|
||||||
and not( $x:result[3]/node() )" />
|
and not( $x:result[3]/node() )" />
|
||||||
|
|
||||||
<expect label="final pass eliminates empty expansion sequence"
|
<expect label="final pass eliminates empty expansion sequence"
|
||||||
test="not( eseq:expand-step( $x:result )/foo:seq )" />
|
test="not( eseq:expand-step( (), $x:result )/foo:seq )" />
|
||||||
</scenario>
|
</scenario>
|
||||||
</description>
|
</description>
|
||||||
|
|
Loading…
Reference in New Issue