<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ab-p-run-049b.xml"
        name="ab-p-run-049b.xml"
        expected="fail"
        code="err:XS0107"
        features="p-run">
   <t:info xmlns:err="http://www.w3.org/ns/xproc-error">
      <t:title>p:run-049b</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2022-10-01</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Added tests for p:run</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:err="http://www.w3.org/ns/xproc-error">
      <p>Tests p:run: use-when does not work with static options on inlined pipelines.</p>
   </t:description>
   <t:pipeline xmlns:err="http://www.w3.org/ns/xproc-error">
      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
         <p:output port="result"/>
         <p:run>
            <p:with-input>
               <p:inline>
                  <p:declare-step xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0">
                     <p:option name="static" as="xs:boolean" static="true" select="true()"/>
                     <p:output port="result"/>
                     <p:identity>
                        <p:with-input use-when="$static">
                           <correct/>
                        </p:with-input>
                     </p:identity>
                  </p:declare-step>
               </p:inline>
            </p:with-input>
            <p:output port="result"/>
         </p:run>
      </p:declare-step>
   </t:pipeline>
</t:test>
