Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
3.2 M2
-
None
Description
For example this allows to rewrite this:
.#----------------------------------------------------- .input|xwiki/2.0 .#----------------------------------------------------- This is ** bold ** .#----------------------------------------------------- .expect|event/1.0 .#----------------------------------------------------- beginDocument beginParagraph onWord [This] onSpace onWord [is] onSpace beginFormat [BOLD] onSpace onWord [bold] onSpace endFormat [BOLD] endParagraph endDocument .#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- <p>This is <strong> bold </strong></p> .#----------------------------------------------------- .expect|xwiki/2.0 .#----------------------------------------------------- This is ** bold ** .#----------------------------------------------------- .input|xhtml/1.0 .#----------------------------------------------------- <p>This is <strong> bold </strong></p> .#----------------------------------------------------- .expect|docbook/4.4 .#----------------------------------------------------- <?xml version="1.0"?><!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.1//EN" "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd"><article><para>This is <emphasis role="bold"> bold </emphasis></para></article> .#----------------------------------------------------- .input|docbook/4.4 .#----------------------------------------------------- <?xml version="1.0"?><!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.1//EN" "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd"><article><para>This is <emphasis role="bold"> bold </emphasis></para></article> .#----------------------------------------------------- .expect|plain/1.0 .#----------------------------------------------------- This is bold
As:
.#----------------------------------------------------- .inputexpect|xwiki/2.0 .#----------------------------------------------------- This is ** bold ** .#----------------------------------------------------- .expect|event/1.0 .#----------------------------------------------------- beginDocument beginParagraph onWord [This] onSpace onWord [is] onSpace beginFormat [BOLD] onSpace onWord [bold] onSpace endFormat [BOLD] endParagraph endDocument .#----------------------------------------------------- .inputexpect|xhtml/1.0 .#----------------------------------------------------- <p>This is <strong> bold </strong></p> .#----------------------------------------------------- .inputexpect|docbook/4.4 .#----------------------------------------------------- <?xml version="1.0"?><!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.1//EN" "http://www.oasis-open.org/docbook/xml/simple/1.1/sdocbook.dtd"><article><para>This is <emphasis role="bold"> bold </emphasis></para></article> .#----------------------------------------------------- .expect|plain/1.0 .#----------------------------------------------------- This is bold
Pros:
- Ensures that input and expect are 100% the same
- Makes test smaller to read