<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/expand-templates-002.xml"
        name="expand-templates-002.xml"
        expected="fail"
        code="err:XD0050">
   <t:info xmlns:err="http://www.w3.org/ns/xproc-error">
      <t:title>expand-templates-002</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2026-05-10</t:date>
            <t:author>
               <t:name>Norm Tovey-Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Fixed title.</p>
            </t:description>
         </t:revision>
         <t:revision>
            <t:date>2025-11-15</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 ex:expand-template.</p>
   </t:description>
   <t:pipeline xmlns:err="http://www.w3.org/ns/xproc-error">
      <p:declare-step xmlns:ex="http://exproc.org/ns/steps"
                      xmlns:p="http://www.w3.org/ns/xproc"
                      name="main"
                      version="3.0">
         <p:import href="https://xmlcalabash.com/ext/library/expand-templates.xpl"/>
         <p:output port="result"/>
         <ex:expand-templates>
            <p:with-input>
               <p:inline exclude-inline-prefixes="#all">
                  <doc>
                     <sum>{{$x+4}}</sum>
                     <greeting>{{$greeting}}</greeting>
                  </doc>
               </p:inline>
            </p:with-input>
            <p:with-option name="variables" select="map{'y':3}"/>
         </ex:expand-templates>
      </p:declare-step>
   </t:pipeline>
</t:test>
