Test nw-sleep-001

Tests that p:sleep works. In point of fact, this test just assures that the step runs, it doesn’t attempt to test that the sleep lasts for the correct duration.

Test is expected to pass.

The pipeline

<p:declare-step xmlns:err="http://www.w3.org/ns/xproc-error"
                xmlns:ex="http://test" xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
   <p:output port="result"/>
   <p:identity>
      <p:with-input>
         <doc/>
      </p:with-input>
   </p:identity>
   <p:sleep duration="1"/>
</p:declare-step>

Result

<doc xmlns:err="http://www.w3.org/ns/xproc-error"
     xmlns:ex="http://test" xmlns:t="http://xproc.org/ns/testsuite/3.0"/>

Schematron checks

<s:schema xmlns:err="http://www.w3.org/ns/xproc-error"
          xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
          queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="doc">The document root is not correct.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

04 Jan 2025, Norm Tovey-Walsh
Adjusted duration now that it’s expected to be in seconds.
28 Dec 2024, Norm Tovey-Walsh
Initial commit.