<?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-012</t:title>

<t:description xmlns="http://www.w3.org/1999/xhtml">
  <p>Tests that the path-separator character in the command
  and the arguments will be replaced with the platform-specific
  path separator.</p>  
</t:description>

<t:pipeline>
  <p:declare-step version='1.0'>
    <p:output port="result"/>
    
    <p:exec name="exec" command="XbinXecho"
            args="aXbXc"
	    path-separator="X"
	    result-is-xml="false" source-is-xml="false">
      <p:input port="source">
        <p:empty/>
      </p:input>
    </p:exec>

    <p:choose>
      <p:when test="contains(/c:result, 'a/b/c') or contains(/c:result, 'a\b\c')">
        <p:identity>
          <p:input port="source">
            <p:inline><success/></p:inline>
          </p:input>
        </p:identity>
      </p:when>
      <p:otherwise>
        <p:identity>
          <p:input port="source">
            <p:inline><failure/></p:inline>
          </p:input>
        </p:identity>
      </p:otherwise>
    </p:choose>
  </p:declare-step>
</t:pipeline>

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

</t:test>

