Commit 9c72142f authored by Alex Theg's avatar Alex Theg

add detect list tests

parent 7d760874
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="../detect-numbered-lists.xsl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsw="http://coko.foundation/xsweet">
<x:scenario>
<x:label>Basic</x:label>
<x:context>
<div class="docx-body">
<p>Not inside a list</p>
<p>1. Here's a list.</p>
<p>2. With a second item.</p>
<p>3. And a third like like this.</p>
</div>
</x:context>
<x:expect label="as list items">
<div class="docx-body">
<p>Not inside a list</p>
<xsw:list level="0" >
<p>1. Here's a list.</p>
<p>2. With a second item.</p>
<p>3. And a third like like this.</p>
</xsw:list>
</div>
</x:expect>
</x:scenario>
</x:description>
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="../itemize-detected-lists.xsl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsw="http://coko.foundation/xsweet">
<x:scenario label="convert xsw:list">
<x:context>
<div class="docx-body">
<p>Not inside a list</p>
<xsw:list level="0" >
<p>1. Here's a list.</p>
<p>2. With a second item.</p>
<p>3. And a third like like this.</p>
</xsw:list>
</div>
</x:context>
<x:expect label="into ol/lis">
<div class="docx-body">
<p>Not inside a list</p>
<ol>
<li>
<p>1. Here's a list.</p>
</li>
<li>
<p>2. With a second item.</p>
</li>
<li>
<p>3. And a third like like this.</p>
</li>
</ol>
</div>
</x:expect>
</x:scenario>
</x:description>
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="../scrub-literal-numbering-lists.xsl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsw="http://coko.foundation/xsweet">
<x:scenario label="remove literal text numbering">
<x:context>
<div class="docx-body">
<p>Not inside a list</p>
<ol>
<li><p>1. Here's a list.</p></li>
<li><p>2. With a second item.</p></li>
<li><p>3. And a third like like this.</p></li>
</ol>
</div>
</x:context>
<x:expect label="from text of ol lis">
<div class="docx-body">
<p>Not inside a list</p>
<ol>
<li>Here's a list.</li>
<li>With a second item.</li>
<li>And a third like like this.</li>
</ol>
</div>
</x:expect>
</x:scenario>
</x:description>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment