<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ab-err-xs0001-010.xml"
        name="ab-err-xs0001-010.xml"
        expected="fail"
        code="err:XS0001">
   <t:info xmlns:err="http://www.w3.org/ns/xproc-error">
      <t:title>XS 001 -10 (AB)</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2020-04-07</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>New test.</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 cycles are correctly detected from within complex steps.</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" name="pipeline" version="3.0">
         <p:output port="result"/>
         <p:try>
            <p:identity>
               <p:with-input>
                  <doc/>
               </p:with-input>
            </p:identity>
            <p:finally>
               <p:output port="secondary" primary="false">
                  <p:pipe step="inner"/>
               </p:output>
               <p:identity name="inner">
                  <p:with-input pipe="@last"/>
               </p:identity>
            </p:finally>
         </p:try>
         <p:wrap-sequence wrapper="result" name="last"/>
      </p:declare-step>
   </t:pipeline>
</t:test>
