Skip to content

Commit

Permalink
test indices only once
Browse files Browse the repository at this point in the history
  • Loading branch information
lueck committed Jan 13, 2025
1 parent 700544d commit ebcc858
Showing 1 changed file with 0 additions and 77 deletions.
77 changes: 0 additions & 77 deletions xsl/latex/libtext.xspec
Original file line number Diff line number Diff line change
Expand Up @@ -393,81 +393,4 @@
/>
</x:scenario>

<x:scenario label="index from persName">
<x:context mode="text:text">
<tei:persName ref="#oma">Oma</tei:persName>
</x:context>
<x:expect label="has start label" test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}')"/>
<x:expect label="has end label" test="matches(., '\\edlabel\{[a-zA-Z0-9]+-end\}$')"/>
<x:expect label="has index entry" test="matches(., '\\index\[person\]\{oma\}')"/>
<x:expect label="has text" test="matches(., 'Oma')"/>
<x:expect label="result"
test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}\\index\[person\]\{oma\}Oma\\edlabel\{[a-zA-Z0-9]+-end\}$')"
/>
</x:scenario>

<x:scenario label="index from placeName">
<x:context mode="text:text">
<tei:placeName ref="#rome">Roma</tei:placeName>
</x:context>
<x:expect label="has start label" test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}')"/>
<x:expect label="has end label" test="matches(., '\\edlabel\{[a-zA-Z0-9]+-end\}$')"/>
<x:expect label="has index entry" test="matches(., '\\index\[place\]\{rome\}')"/>
<x:expect label="has text" test="matches(., 'Roma')"/>
<x:expect label="result"
test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}\\index\[place\]\{rome\}Roma\\edlabel\{[a-zA-Z0-9]+-end\}$')"
/>
</x:scenario>

<x:scenario label="index from orgName">
<x:context>
<tei:orgName key="teic">TEI-C</tei:orgName>
</x:context>
<x:expect label="has start label" test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}')"/>
<x:expect label="has end label" test="matches(., '\\edlabel\{[a-zA-Z0-9]+-end\}$')"/>
<x:expect label="has index entry" test="matches(., '\\index\[org\]\{teic\}')"/>
<x:expect label="has text" test="matches(., 'TEI-C')"/>
<x:expect label="result"
test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}\\index\[org\]\{teic\}TEI-C\\edlabel\{[a-zA-Z0-9]+-end\}$')"
/>
</x:scenario>

<x:scenario label="index from eventName">
<x:context>
<tei:eventName ref="#pragueDefenestration">Prager Fenstersturz</tei:eventName>
</x:context>
<x:expect label="has start label" test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}')"/>
<x:expect label="has end label" test="matches(., '\\edlabel\{[a-zA-Z0-9]+-end\}$')"/>
<x:expect label="has index entry"
test="matches(., '\\index\[event\]\{pragueDefenestration\}')"/>
<x:expect label="has text" test="matches(., 'Prager\s*Fenstersturz')"/>
<x:expect label="result"
test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}\\index\[event\]\{pragueDefenestration\}Prager Fenstersturz\\edlabel\{[a-zA-Z0-9]+-end\}$')"
/>
</x:scenario>

<x:scenario label="index from rs of type place">
<x:context>
<tei:rs type="place" ref="#rome">Roma</tei:rs>
</x:context>
<x:expect label="has start label" test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}')"/>
<x:expect label="has end label" test="matches(., '\\edlabel\{[a-zA-Z0-9]+-end\}$')"/>
<x:expect label="has index entry" test="matches(., '\\index\[place\]\{rome\}')"/>
<x:expect label="has text" test="matches(., 'Roma')"/>
<x:expect label="result"
test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}\\index\[place\]\{rome\}Roma\\edlabel\{[a-zA-Z0-9]+-end\}$')"
/>
</x:scenario>

<x:scenario label="multiple index entries from rs of type place">
<x:context>
<tei:rs type="place" ref="#cologne #hamburg #munich #berlin" xml:space="preserve">in deutschen Städte mit mehr als einer Million Einwohnern</tei:rs>
</x:context>
<x:expect label="has start label" test="matches(., '^\\edlabel\{[a-zA-Z0-9]+-start\}')"/>
<x:expect label="has end label" test="matches(., '\\edlabel\{[a-zA-Z0-9]+-end\}$')"/>
<x:expect label="has index entries"
test="matches(., '\\index\[place\]\{cologne\}\\index\[place\]\{hamburg\}\\index\[place\]\{munich\}\\index\[place\]\{berlin\}')"
/>
</x:scenario>

</x:description>

0 comments on commit ebcc858

Please sign in to comment.