Commit 896fb7bb authored by MRodz's avatar MRodz Committed by mrodzis
Browse files

Update tests

parent cfe00a35
......@@ -21,17 +21,17 @@ declare
declare
%test:name("Events: Full references")
%test:args("eve:Thesenanschlag", "eve")
%test:args("eve:Thesenanschlag", "eve", "regular-name")
%test:assertEquals("Thesenanschlag")
function index-info-test:places-full-reference($node as xs:string, $type as xs:string) {
index-info:get-full-ref($node, $type)
function index-info-test:places-full-reference($term as xs:string, $index-type as xs:string, $info as xs:string) {
index-info:get-info-about($index-type, $term, $info)
};
declare
%test:name("Events: Full references - transformation result")
%test:args("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""eve:Thesenanschlag""/>")
%test:assertEquals("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""eve:Thesenanschlag"" full-ref-1=""Thesenanschlag"" place-1=""plc:Kirche_Wittenberg"" occs-1=""""/>")
%test:assertEquals("<rs xmlns=""http://www.tei-c.org/ns/1.0"" type=""direct"" ref=""eve:Thesenanschlag"" regular-name-1=""Thesenanschlag"" place-1=""plc:Kirche_Wittenberg"" occs-1=""""/>")
function index-info-test:places-full-reference-xml($node as element(*)) {
fontaneSimple:transform($node)
......@@ -39,34 +39,34 @@ declare
declare
%test:name("Events: Places")
%test:args("eve:Thesenanschlag")
%test:args("eve:Thesenanschlag", "eve", "place")
%test:assertEquals("plc:Kirche_Wittenberg")
function index-info-test:places-full-reference($node as xs:string) {
index-info:get-event-place($node)
function index-info-test:places-full-reference($term as xs:string, $index-type as xs:string, $info as xs:string) {
index-info:get-info-about($index-type, $term, $info)
};
declare
%test:name("Places: Full references")
%test:args("plc:Thueringen", "plc")
%test:args("plc:Thueringen", "plc", "regular-name")
%test:assertEquals("Thüringen")
(: entry with several variant names :)
%test:args("plc:Albaner_Berge", "plc")
%test:args("plc:Albaner_Berge", "plc", "regular-name")
%test:assertEquals("Albaner Berge (ital.: Colli Albani), Albanergebirge")
function index-info-test:places-full-reference($node as xs:string, $type as xs:string) {
index-info:get-full-ref($node, $type)
function index-info-test:places-full-reference($term as xs:string, $index-type as xs:string, $info as xs:string) {
index-info:get-info-about($index-type, $term, $info)
};
declare
%test:name("Places: Subreferences")
%test:args("plc:Sacro_Convento_Assisi")
%test:args("plc:Sacro_Convento_Assisi", "plc", "subref-of")
%test:assertEquals("Assisi")
%test:args("plc:Thueringen")
%test:args("plc:Thueringen", "plc", "subref-of")
%test:assertEquals("")
function index-info-test:places-sub-reference($node as xs:string) {
index-info:get-place-sub-ref($node)
function index-info-test:places-sub-reference($term as xs:string, $index-type as xs:string, $info as xs:string) {
index-info:get-info-about($index-type, $term, $info)
};
\ 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