<?xml-stylesheet type="text/xsl" href="/style/testcase.xsl"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite"
        xmlns:p="http://www.w3.org/ns/xproc"
        xmlns:c="http://www.w3.org/ns/xproc-step"
        xmlns:err="http://www.w3.org/ns/xproc-error">

<t:title>Test exec-011</t:title>

<t:description xmlns="http://www.w3.org/1999/xhtml">
  <p>Tests that an failure-threshold is handled properly.</p>  
</t:description>

<t:input port="source">
<doc>some text</doc>
</t:input>

<t:pipeline>
  <p:pipeline version='1.0'>
    
    <p:try>
      <p:group>
        <p:exec name="exec" command="/bin/cat" result-is-xml="false" source-is-xml="false"
                failure-threshold="-100000"/>
        <p:sink/>
        <p:identity>
          <p:input port="source">
            <p:inline><failure/></p:inline>
          </p:input>
        </p:identity>
      </p:group>
      <p:catch>
        <p:identity>
          <p:input port="source">
            <p:inline><success/></p:inline>
          </p:input>
        </p:identity>
      </p:catch>
    </p:try>
    
  </p:pipeline>
</t:pipeline>

<t:output port="result">
<success/>
</t:output>

</t:test>

