railroad-005

Tests that cx:railroad fails if a non-existant nonterminal option is specified.

Test is expected to fail with error code cxerr:XC0010.

The pipeline

<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
                xmlns:cxerr="http://xmlcalabash.com/ns/error" xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" name="main" version="3.0">
   <p:import href="https://xmlcalabash.com/ext/library/railroad.xpl"/>
   <p:output port="result" sequence="true"/>
   <cx:railroad inline-literals="false"
                nonterminal="spoon">
      <p:with-input>
         <p:inline content-type="text/plain">
S ::= A B
A ::= "a"
B ::= B1 | B2
B1 ::= B2
B2 ::= "b"
      </p:inline>
      </p:with-input>
   </cx:railroad>
</p:declare-step>

Revision history

30 Jan 2025, Norm Tovey-Walsh
Created test.