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 )">
|
||||
<foo:seq foo="baz">
|
||||
<sequence select="eseq:expand-node( $foo:a/foo:node[1] ),
|
||||
eseq:expand-node( $foo:a/foo:node[2] )" />
|
||||
<sequence select="eseq:expand-node( (), $foo:a/foo:node[1] ),
|
||||
eseq:expand-node( (), $foo:a/foo:node[2] )" />
|
||||
</foo:seq>
|
||||
</variable>
|
||||
|
||||
|
@ -71,6 +71,7 @@
|
|||
|
||||
<function name="eseq:expand-node" as="node()*"
|
||||
override="yes">
|
||||
<param name="context" />
|
||||
<param name="node" as="node()" />
|
||||
|
||||
<choose>
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
<scenario label="Pass on an expansion sequence">
|
||||
<scenario label="with an empty sequence">
|
||||
<call function="eseq:expand-step">
|
||||
<param name="context"
|
||||
select="()" />
|
||||
<param name="eseq"
|
||||
select="$foo:empty-eseq" />
|
||||
</call>
|
||||
|
@ -43,6 +45,8 @@
|
|||
|
||||
<scenario label="with no sequence">
|
||||
<call function="eseq:expand-step">
|
||||
<param name="context"
|
||||
select="()" />
|
||||
<param name="eseq"
|
||||
select="()" />
|
||||
</call>
|
||||
|
@ -54,6 +58,8 @@
|
|||
|
||||
<scenario label="with an expansion element">
|
||||
<call function="eseq:expand-step">
|
||||
<param name="context"
|
||||
select="()" />
|
||||
<param name="eseq"
|
||||
select="$foo:a" />
|
||||
</call>
|
||||
|
@ -73,9 +79,12 @@
|
|||
<scenario label="with an expanded node">
|
||||
<!-- notice the additional expand-step calls -->
|
||||
<call function="eseq:expand-step">
|
||||
<param name="context"
|
||||
select="()" />
|
||||
<param name="eseq"
|
||||
select="eseq:expand-step(
|
||||
eseq:expand-step( $foo:a ) )" />
|
||||
(),
|
||||
eseq:expand-step( (), $foo:a ) )" />
|
||||
</call>
|
||||
|
||||
<expect label="hoists expanded element out of sequence"
|
||||
|
@ -92,9 +101,12 @@
|
|||
<scenario label="with nodes still pending expansion">
|
||||
<!-- notice the additional expand-step calls -->
|
||||
<call function="eseq:expand-step">
|
||||
<param name="context"
|
||||
select="()" />
|
||||
<param name="eseq"
|
||||
select="eseq:expand-step(
|
||||
eseq:expand-step( $foo:unexpandable ) )" />
|
||||
(),
|
||||
eseq:expand-step( (), $foo:unexpandable ) )" />
|
||||
</call>
|
||||
|
||||
<!-- if this fails, then our is-expanded predicate is not being
|
||||
|
@ -107,9 +119,11 @@
|
|||
|
||||
<scenario label="Pass on expansion sequence with hoisted node">
|
||||
<variable name="foo:hoisted"
|
||||
select="eseq:expand-step( $foo:expanded )" />
|
||||
select="eseq:expand-step( (), $foo:expanded )" />
|
||||
|
||||
<call function="eseq:expand-step">
|
||||
<param name="context"
|
||||
select="()" />
|
||||
<param name="eseq"
|
||||
select="$foo:hoisted" />
|
||||
</call>
|
||||
|
@ -128,6 +142,6 @@
|
|||
and not( $x:result[3]/node() )" />
|
||||
|
||||
<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>
|
||||
</description>
|
||||
|
|
Loading…
Reference in New Issue