Commit 6ce18514 authored by mrodzis's avatar mrodzis 🌎
Browse files

Add test for Friedrich Fontane's TOCs

parent 6b7cd392
......@@ -34,7 +34,7 @@ declare
%test:args("<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" xml:id=""a4""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""handshift"" subtype=""#fremde_Hand3"" rend=""script(Latn clean) medium()""/><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line"" rendition=""align(center)""/>✓ </div>")
%test:assertEquals("<div xmlns=""http://www.tei-c.org/ns/1.0"" type=""label"" xml:id=""a4""><milestone xmlns=""http://www.tei-c.org/ns/1.0"" unit=""line"" rendition=""align(center)""/></div>")
function tidysimple-test:handShift-invalid($node as element(*)) {
function tidysimple-test:handShift-invalid-nodes($node as element(*)) {
tidySimple:sort-out-invalid-hands($node)
};
......@@ -80,4 +80,18 @@ declare
function tidysimple-test:tidying($node as element(*)) {
tidySimple:sort-out-surplus-elements($node)
};
(: TOC by Friedrich Fontane :)
declare
%test:name("TOC by Friedrich Fontane")
%test:args("<list type=""toc"" subtype=""Friedrich_Fontane""><milestone unit=""handshift"" subtype=""#Archivar2"" rend=""script() medium()""/><milestone unit=""line""/><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script() medium(blue_ink)""/><milestone unit=""line""/>Material zu<milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium()""/><item>Ellernklipp</item><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium(black_ink)""/><item><ref target=""#xpath(//surface[@n='21r'])"">Wanderungen (Spreeland)</ref></item><milestone unit=""handshift"" subtype=""#Fontane"" rend=""script(Latf) medium(pencil)""/></list>")
%test:assertEquals("<list type=""toc"" subtype=""Friedrich_Fontane""><milestone unit=""line""/><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script() medium(blue_ink)""/><milestone unit=""line""/>Material zu<milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium()""/><item>Ellernklipp</item><milestone unit=""handshift"" subtype=""#Friedrich_Fontane"" rend=""script(Latn) medium(black_ink)""/><item><ref target=""#xpath(//surface[@n='21r'])"">Wanderungen (Spreeland)</ref></item><milestone unit=""handshift"" subtype=""#Fontane"" rend=""script(Latf) medium(pencil)""/></list>")
function tidysimple-test:toc-by-friedrich($node as element(*)) {
tidySimple:sort-out-invalid-hands($node)
=> tidySimple:sort-out-surplus-elements()
=> tidySimple:whitespaces()
=> tidySimple:split-headings()
};
\ No newline at end of file
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