<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/message-006.xml"
        name="message-006.xml"
        expected="fail"
        code="err:XS0008">
   <t:info xmlns:err="http://www.w3.org/ns/xproc-error">
      <t:title>message-006</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2025-08-24</t:date>
            <t:author>
               <t:name>Norm Tovey-Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Created 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 that message on p:catch is forbidden.</p>
   </t:description>
   <t:pipeline xmlns:err="http://www.w3.org/ns/xproc-error">
      <p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
                      xmlns:p="http://www.w3.org/ns/xproc"
                      xmlns:s="http://purl.oclc.org/dsdl/schematron"
                      version="3.0">
         <p:import href="https://xmlcalabash.com/ext/library/pipeline-messages.xpl"/>
         <p:output port="result"/>
         <p:identity>
            <p:with-input>
               <doc/>
            </p:with-input>
         </p:identity>
         <p:try name="dep">
            <p:error code="Q{}bang"/>
            <p:catch message="Not allowed here">
               <p:identity/>
            </p:catch>
         </p:try>
         <cx:pipeline-messages p:depends="dep" level="info"/>
      </p:declare-step>
   </t:pipeline>
</t:test>
