<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/ab-file-move-012.xml"
        name="ab-file-move-012.xml"
        expected="pass"
        features="p:file-move">
   <t:info>
      <t:title>p:file-move 012 (AB)</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2022-08-02</t:date>
            <t:author>
               <t:name>Achim Berndzen</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Initial commit</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>Tests p:file-move</p>
   </t:description>
   <t:file-environment/>
   <t:pipeline>
      <p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step"
                      xmlns:p="http://www.w3.org/ns/xproc"
                      version="3.0">
         <p:output port="result"/>
         <p:file-move href="../testfolder/i-do-not-exist"
                      target="../testfolder/new-folder"
                      fail-on-error="false"/>
      </p:declare-step>
   </t:pipeline>
   <t:schematron>
      <s:schema xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://purl.oclc.org/dsdl/schematron"
                queryBinding="xslt2">
         <s:ns uri="http://www.w3.org/ns/xproc-step" prefix="c"/>
         <s:ns uri="http://www.w3.org/2001/XMLSchema" prefix="ns"/>
         <s:pattern>
            <s:rule context="/">
               <s:assert test="c:error">Root element is not c:error.</s:assert>
               <s:assert test="c:error/@code='{http://www.w3.org/ns/xproc-error}XD0011'">The error code is not XD0011.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="ab-file-move-012.xml">
      <c:error xmlns:c="http://www.w3.org/ns/xproc-step"
               code="{http://www.w3.org/ns/xproc-error}XD0011">Error accessing /woodpecker/src/codeberg.org/xmlcalabash/xmlcalabash3/tests/3.0-test-suite/test-suite/testfolder/i-do-not-exist</c:error>
   </t:result>
</t:test>
