`f:args' ignores adjacent data
parent
2760834bfb
commit
e93283c608
|
@ -160,7 +160,12 @@
|
|||
<function name="f:args" as="item()*">
|
||||
<param name="fnref" as="item()+" />
|
||||
|
||||
<sequence select="remove( $fnref, 1 )" />
|
||||
<variable name="desc" as="element( f:ref )"
|
||||
select="$fnref[ 1 ]" />
|
||||
<variable name="length" as="xs:double"
|
||||
select="$desc/@length" />
|
||||
|
||||
<sequence select="subsequence( $fnref, 2, ( $length - 1 ) )" />
|
||||
</function>
|
||||
|
||||
|
||||
|
|
|
@ -423,6 +423,23 @@
|
|||
<expect label="returns no other items"
|
||||
test="count( $x:result ) = 2" />
|
||||
</scenario>
|
||||
|
||||
|
||||
<scenario label="operating on a reference preceding adjacent data">
|
||||
<call function="f:args">
|
||||
<param name="fnref"
|
||||
select="f:set-args( $test-fn, ($args/foo:a,
|
||||
$args/foo:b) ),
|
||||
'adjacent data'" />
|
||||
</call>
|
||||
|
||||
<expect label="returns sequence of arguments by reference"
|
||||
test="$x:result[ 1 ] is $args/foo:a
|
||||
and $x:result[ 2 ] is $args/foo:b" />
|
||||
|
||||
<expect label="returns no adjacent data"
|
||||
test="count( $x:result ) = 2" />
|
||||
</scenario>
|
||||
</scenario>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue