<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0" xmlns:err="http://www.w3.org/ns/xproc-error" expected="fail" code="err:XD0016" features="HOF">
   <t:info>
      <t:title>with-input-select-015</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2023-08-14</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Initial tests.</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Tests that XD0016 is raised, when @select returns a function.</p>
   </t:description>
   <t:pipeline>
      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:output port="result"/>
         <p:variable name="funct" select="function($a){$a}" />
         <p:identity>
             <p:with-input select="$funct">
                 <doc att1="1" att2="3"/>
             </p:with-input>
         </p:identity>
        </p:declare-step>
   </t:pipeline>
</t:test>